See api-docs Menu

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

https://<subdomain>/auth/
rate_limit

Parameters

Authorization

required

string

Set to bearer:<access_token>.

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: Read Users, Manage users, Read All, or Manage All.

Sample Response

{
    "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

X-RateLimit-Limit

Displays the rate limit itself.

X-RateLimit-Remaining

Displays the remaining calls available for the hour.

X-RateLimit-Reset

Displays the remaining time in seconds before the rate limit is reset to 5,000 for the next full hour.

Postman Collection

Replace sample variables indicated by {{ }} with your actual values.

Download for the OAuth 2.0 Tokens API

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.