I have developed an activity tracker app for my running group. The problem that I am facing is hitting rate limit quite often and major API calls are related to refresh access token.
I just want to get suggesion and best practices from fellow devs here, so I can optimize API calls and avoid hitting rate limit and can also provide my running fellows real time activity data :)
Thanks in advance for your help.
How to avoid rate limit
Best answer by ActivityFix
I may be incorrect on this part, but I believe the authentication/access token flow does not use up any of your API calls. It is only calls to API endpoints which count towards your limit.
As far as optimizing calls, I’ve posted some comments before about what I do. Try this one
A big part of how many API calls you use also comes down to what data you need and how often you need it. If you’re fetching activity streams then you need at least 2 API calls per activity. Add another if you’re updating the activity.
The other big one is to use Webhooks if you haven’t already enabled them. That will move your app to a push model instead of a pull model, so you don’t have to waste API calls polling for activities and can instead react to the webhook.
Login to the community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
