helpscout / helpscout-api-php

PHP Wrapper for the Help Scout API
MIT License
98 stars 62 forks source link

Rate limit exceeded #257

Closed arbind-ladybird closed 3 years ago

arbind-ladybird commented 3 years ago

Hello when i am trying to fetch conversation records from helpscout page wise. Per page it contains 25 records. After getting a collection of 25 records I'm performing operation on it like getting type, status etc. as per your provided method on github. But suddenly it throws error Rate limit exceeded. But I'm not making more than 400 request per minute. And still getting rate limit issues. How I will handle this?

bkuhl commented 3 years ago

Hey @arbind-ladybird,

Are there other services on your account interacting with the API at the same time? If so, that could be the source of the issue since all users associated with the same account count against the same minute rate limit. Write requests also count extra against the rate limiting which also may play a role depending on what actions are being performed on those conversations.

arbind-ladybird commented 3 years ago

No other services are interacting with them at the same time. However I have handled this by modifying existing rate limit handler file by pausing the script for 15 sec when remaining rate limit is 2.

On Tue, Dec 1, 2020 at 1:36 AM Ben Kuhl notifications@github.com wrote:

Hey @arbind-ladybird https://github.com/arbind-ladybird,

Are there other services on your account interacting with the API at the same time? If so, that could be the source of the issue since all users associated with the same account count against the same minute rate limit. Write requests also count extra against the rate limiting https://developer.helpscout.com/mailbox-api/overview/rate-limiting/ which also may play a role depending on what actions are being performed on those conversations.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/helpscout/helpscout-api-php/issues/257#issuecomment-736013139, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARD3GQKHTTYZXUA3PPNOIJDSSP3M7ANCNFSM4UB6E3DA .

bkuhl commented 3 years ago

Sounds good, thanks for following up with your solution - others might find it useful.