See api-docs Menu

Get Rate Limit

Get current rate limit details about an access token.

The rate limit for an access token is 5,000 calls per hour.

Resource URL

https://api.<us_or_eu>.onelogin.com/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://api.<us_or_eu>.onelogin.com/auth/rate_limit' \
-X GET \
-H "Authorization: bearer:<access_token>"

Python

See Work with OAuth 2.0 Tokens, Users, and Roles.


Have a Question?

Have a how-to question? Seeing a weird error? Ask us about it on StackOverflow.

Found a bug? Submit a support ticket.

Have a product idea or request? Share it with us in our Ideas Portal.