How to check rate limit usage of a GitHub Access Token?


How can i check rate limit usage of a GitHub's Access Token?

1 Answer

7 years ago by

Run the following curl

curl https://api.github.com/?access_token=<Your Token> -v

Then in the response headers you see something like following

< HTTP/1.1 200 OK
< Server: GitHub.com
< Date: Sun, 04 Mar 2018 14:57:10 GMT
< Content-Type: application/json; charset=utf-8
< Content-Length: 2165
< Status: 200 OK
< X-RateLimit-Limit: 5000
< X-RateLimit-Remaining: 4981
< X-RateLimit-Reset: 1520178570
< Cache-Control: private, max-age=60, s-maxage=60
< Vary: Accept, Authorization, Cookie, X-GitHub-OTP

Look at the X-RateLimit-Remaining value that tells you the remaining rate limits you have on that accesstoken, you can also check the Reset time in X-RateLimit-Reset headers.

7 years ago by Karthik Divi