Get Rate Limit
Get current rate limit details about an access token.
There is an account level rate limit of 5,000 calls per hour regardless of how many access tokens you have. If an access token surpasses this limit, API calls will return an error. After the hour has passed, the count will be reset to a full 5,000 available calls.
Resource URL
Before calling this API, consider using its version /2 equivalent.
https://<subdomain>/auth/
rate_limit
Parameters
Authorization required string |
Set to The access token you provide must have been issued using an API credential pair generated using the scope required to call this API. This API can be called using any one of the following scopes: |
Sample Response
- 200 OK
- 400 Bad Request
- 401 Unauthorized
- 404 Not Found
{
"status": {
"error": false,
"code": 200,
"type": "success",
"message": "Success"
},
"data": {
"X-RateLimit-Limit": 5000,
"X-RateLimit-Remaining": 4988,
"X-RateLimit-Reset": 832
}
}
{
"status": {
"error": true,
"code": 400,
"type": "bad request",
"message": "Authorization Information is incorrect"
}
}
{
"status": {
"error": true,
"code": 401,
"type": "Unauthorized",
"message": "Authentication Failure"
}
}
Typically, this error means that you are using the incorrect method. If you receive this error, ensure that you are making a GET.
{
"status": {
"error": true,
"code": 404,
"type": "not found",
"message": "No Route Exists"
}
}
Response Elements
|
Displays the rate limit itself. |
|
Displays the remaining calls available for the hour. |
|
Displays the remaining time in seconds before the rate limit is reset to 5,000 for the next full hour. |
Postman Collection
- Clicking Run in Postman button navigates to the page where you can fork the collection to your workspace. Forking the collection into your workspace will enable you to contribute to the source collection using pull requests. You can also view the collection in a public workspace if you like and even import a copy of the collection using the links present on the screen.
Sample Code
cURL
Replace sample values indicated by < >
with your actual values.
curl 'https://<subdomain>/auth/rate_limit' \
-X GET \
-H "Authorization: bearer:<access_token>"
Python
See Work with OAuth 2.0 Tokens, Users, and Roles.
Have a Question?
Found a problem or a bug? Submit a support ticket.
Looking for walkthroughs or how-to guides on OneLogin's user and admin features? Check out the documentation in our Knowledge Base.
Have a product idea or request? Share it with us in our Ideas Portal.