Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Instagram "You Cannot Like this Media"

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?

like image 644
Jordan Schuetz Avatar asked Jan 05 '14 03:01

Jordan Schuetz


3 Answers

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.

like image 63
Lucia Avatar answered Nov 19 '22 05:11

Lucia


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.

like image 31
dekevin Avatar answered Nov 19 '22 05:11

dekevin


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.

like image 2
humminglion Avatar answered Nov 19 '22 06:11

humminglion