InstaBot icon indicating copy to clipboard operation
InstaBot copied to clipboard

OAuthRateLimitException is thrown after 30 liked images

Open fro35i opened this issue 11 years ago • 20 comments

After I liked 30 images, I get the following error message: {"meta":{"error_type":"OAuthRateLimitException","code":429,"error_message":"The maximum number of requests per hour has been exceeded. You have made 38 requests of the 30 allowed in the last hour."}}

So it seems that only 30 requests are allowed in one hour? Does instagram have such a bad request limitation now or does the limitation of unsigned requests might be the problem?

fro35i avatar Aug 25 '14 17:08 fro35i

Hi fro35i, I am signing the requests with the header, I do not know why we are getting this limitation http://instagram.com/developer/restrict-api-requests/# because in my latest commit f4523880f93c04066bdb7a7bb5eca3f5ea06087f I have signed and requested the correct header request. As stated previously, I will be investigating tonight, let me know if you find anything. Thanks

marclave avatar Aug 25 '14 17:08 marclave

I found this information on a forum which may assist, but I'm really not positive. However, it may be something to look into:

"I've discovered what it most likely is. You're using webbrowser bots, or at least your bot is sending requests to Websta.me website, instead of actually sending the requests directly to IG's API. I did some reading on their Limits page in the Developer section of their site and read that unsigned requests (requests not send from the website where the access token was gained) will be even more limited than unsigned requests. But the thing is, I don't think I can bypass this because it requires a header called "X-Insta-Forwarded-For" which requires both the website IP and their client secret. However, I can always just send requests to websites like iconosquare, etc."

guygnarly avatar Sep 01 '14 20:09 guygnarly

Hi GuyGnarly, the bot is sending requests through Instagrams API, the only interaction with Websta.me is the parsing of the top 100 hastags. Notice in the source code I have a function called encodeAndRequest; this function adds the header with the request

marclave avatar Sep 09 '14 16:09 marclave

I too am experiencing this issue. {"meta":{"error_type":"OAuthRateLimitException","code":429,"error_message":"The maximum number of requests per hour has been exceeded. You have made 32 requests of the 30 allowed in the last hour."}}SOMETHING WENT WRONG 429

visualrealityink avatar Sep 30 '14 21:09 visualrealityink

Hi marclave, I do see where you are using the instagram API, if I am not mistaken the problem is due to the fact that the "accesstoken" is not being pulled from within your application from the instagram API. You require us to set it in profile.yml therefore this makes the request "unsigned". I believe you need to establish a connection with the instagram API and request a new "accesstoken" and extract it from the returned url every 30 likes.

visualrealityink avatar Sep 30 '14 21:09 visualrealityink

Hi visualrealityink, I see how that can be the issue, I will try and code this tonight(Just got out of a linear circuit lab), thanks!

marclave avatar Oct 01 '14 00:10 marclave

Hi marclave, No problem. Just to be safe I would request a new "accesstoken" every 25 to 27 likes that way you have a bit of padding ;) Let me know when you have posted the code and I will give a test run for you.

visualrealityink avatar Oct 01 '14 00:10 visualrealityink

Hi marclave,

If I can be of any help just let me know.

visualrealityink avatar Oct 01 '14 16:10 visualrealityink

Hi visualrealityink,

Yeah this week is really busy for me but I will be able to work on it this weekend. If you want to branch and try a solution go for it. I think i need to re-write most of the structure of the present InstaBot but if you find a simple work around, great!

marclave avatar Oct 01 '14 16:10 marclave

I will fork it tonight and play with it. All you should need to do is write a function that gets a new instagram UR, strip the accesstoken code and use it.

visualrealityink avatar Oct 01 '14 18:10 visualrealityink

Hi marclave,

I have part of the solution already derrived. I am going to fork the project and upload my new additions. They are not complete. What I have done so far is pulled in https://github.com/Instagram/python-instagram and have gotten it to return the "access_token" what I have not gotten done yet is to have that token intigrated into your code. If we get that "access_token" that I am pulling from the "python-instagram" module and storing into your code that runs we should be set. I will have it forked in a few hours.

visualrealityink avatar Oct 01 '14 23:10 visualrealityink

Hi,

Any new updates in this thread?

mko510 avatar Nov 05 '14 01:11 mko510

Any update, would love to see progress @visualrealityink

jerryromel avatar Jan 05 '15 17:01 jerryromel

Hi,

Any new updates in this thread? the script stop working after 30 likes :( @visualrealityink @marclave

jrefos1 avatar Jan 20 '15 00:01 jrefos1

"the script stop working after 30 likes" -same issue for me

chinciusan avatar Jan 20 '15 07:01 chinciusan

Hi everyone, I have not been updating this thread because i worked extensively on a fix but found no workaround, I know the 30 like limit is not enjoyable; however, I have been very busy and will try again next weekend. I will update this thread, thank you.

  • Marc

marclave avatar Jan 21 '15 02:01 marclave

you think mechanize would be better for passing the hmac sig etc instead of pycurl? just a guess, i forked btw ill be doing some messing with it

AyuReadyX avatar Jan 23 '15 18:01 AyuReadyX

Hi Marclave,

Do you have any plans on fixing this issue?

ramiyahya avatar Apr 29 '15 05:04 ramiyahya

@ramiyahya i have tried many approaches and no ideas really..

marclave avatar May 08 '15 23:05 marclave

@marclave Can't you edit the code in a way so that the bot will like the pictures and follow users through webstagram?

arvand avatar Jun 04 '15 09:06 arvand