-
Notifications
You must be signed in to change notification settings - Fork 24
get_subscriber_id() causes 429 "Too many requests" API error when total pages > 120 #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Just ran into this one myself. I'd pulled the SDK into my project prior to your posting, so didn't see it in open issues, and spent the last couple hours scratching my head. Found the issue, came here to post, and saw your fix. Thank you! |
Here's a workaround until the fix is merged, just make a direct request to /subscribers with the necessary options set instead of using get_subscriber_id():
|
If it helps anyone you can use this fork https://github.com/mnwalker/convertkitsdk-php Fixes this issue which also gives a massive performance boost if have many subscribers. Have sent @convertkit a pull request but will need someone to merge them. |
Fixed in #31. Thanks! |
The exact number of pages seems to vary, but calling this function is very slow and eventually causes the API to throw a 429 error for an account with lots of subscribers, because it queries the API for all subscribers and searches the results instead of searching the API directly for the provided email.
It is possible to search by email when listing subscribers using the
email_address
parameter according to https://developers.convertkit.com/#list-subscribersAdding the
email_address
parameter to$options
inget_subscriber_id()
should fix this issue.The text was updated successfully, but these errors were encountered: