Instagram "You Cannot Like this Media"
Asked Answered
W

3

10

I am aware that the Instagram API was down a few hours ago, but it seems to be back up now. The problem is, when we post data to Instagram saying to like a specific photo, we get this error:

{"meta":{"error_type":"APINotAllowedError","code":400,"error_message":"you cannot like this media"}}

We have gotten this error before, but we don't understand why we are getting it. Keep in mind, we logged into an alternate account which means that account hasn't even liked the media yet.

If it helps at all to know, we are running the like command by requesting the url https://api.instagram.com/v1/media/{media-id}/likes with {media-id} being replaced by the image id, and we are including the user's access token in the body of the http request. This is obviously a post request

There is no Instagram documentation on why we would get this message. Does anyone have a solution?

Westernism answered 5/1, 2014 at 3:44 Comment(4)
This question is possibly off-topic as it is reporting a bug, and wanting a solution to it.Cosec
This is not a bug, this is a on topic question. I'm wondering if anyone has any information or if we are possibly trying to like the same photo ID too many time :(Westernism
Sounds to me like Instagram is questioning your taste in pictures. ;)Literal
Though I don't know the answer, it's definitely not off topic. It's about why one would get that specific error message when making a specific API call. Just imagine if it were asking why one would get a specific exception when calling a particular Java function.Lichee
K
3

See API Terms of Use:

Do not abuse the API. Too many requests too quickly will get your access turned off

I've waited another day and the problem didn't go away. Also I've tried creating a new client with the current user with no avail. So by your I guess they mean "all clients from this user". You'll have to get another user and create a brand new client with it. Worked for me.

Keele answered 21/8, 2014 at 2:27 Comment(0)
A
2

One the one hand it's a bug, on the other I realize that if a picture gehts liked to often in a short time also the error occurs.

Try it with another token, create new one from another client.

Archy answered 5/1, 2014 at 8:36 Comment(0)
A
2

You probably hit a rate limit more than once and they've classified you as an API abuser. Most likely you'll need to wait up to a week without making any likes via that access token for the timeout to expire.

Alkylation answered 5/3, 2015 at 7:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.