0

How to check account API limit when using sendgrid python API?

I need to know the limits and according will tweak my program to avoid hitting the API limits. Probably the limit is 600 calls per minute.

But I want to know the python api endpoint which will retrieve that.

The only documentation I found is: https://sendgrid.com/docs/API_Reference/Web_API_v3/How_To_Use_The_Web_API_v3/rate_limits.html

How do I implement this in python API client?

  • Did you try anything so far? If so, share your code. [This SO question](https://stackoverflow.com/questions/17301938/making-a-request-to-a-restful-api-using-python) has an example of making an API request through python and there are many more examples available if you use Google. – Casper Jul 09 '18 at 08:51
  • 1
    The documentation is very clear about rate limiting. You will find rate limiting quote and information in ```resource``` endpoint response header. ```X-RateLimit-Limit``` means **Number of api calls you can**, ```X-RateLimit-Remaining``` means **remaining api call limit within specific time frame**, ```X-RateLimit-Reset``` means **when rate limiting will be reset to normal**. So, whenever you want to know about rate limit you will have to call ```https://api.sendgrid.com/v3/resource``` endpoint to know that. – Tamim Jul 09 '18 at 09:03

0 Answers0