Skip to main content
POST
Refresh Access Token

Rate Limit

This endpoint allows 30 requests per 10 minutes and 5 requests per minute. Both limits apply per client_id and refresh_token pair. A 429 response includes a Retry-After header that gives the number of seconds to wait. The same value also appears in the deprecated X-RETRY-AFTER header. Read Retry-After. Refresh proactively, a few minutes before the access token expires, instead of waiting for an ER008 on an API call. Use the expires_in value returned with the access token to schedule the refresh. Refresh at least once every 24 hours. A refresh token that goes unused for 24 hours expires, and the access tokens issued from that refresh token stop working even when expires_in has not run out.

Body

application/x-www-form-urlencoded

The form-encoded parameters for the refresh token grant.

grant_type
enum<string>
required

The OAuth 2.0 grant type. The supported value is refresh_token.

Available options:
refresh_token
client_id
string
required

Your Workspace ID. The value must match the Workspace ID that the refresh token was issued to, or the request fails with ER010.

refresh_token
string
required

The refresh token returned by Generate Access Token. The refresh token expires after 24 hours without a refresh, and after 30 days at most.

Response

MoEngage issued a new access token. The response does not carry a new refresh token. The refresh token sent in the request stays valid for another 24 hours, up to 30 days from the moment MoEngage issued the token.

access_token
string

The new access token that you send as a Bearer token on your API requests.

token_type
string

The token type. The value is always Bearer.

Example:

"Bearer"

expires_in
integer

The lifetime of the new access token, in seconds. The value reflects the Expiry time (in minutes) set on the API key.

Example:

900

refresh_token_expires_in
integer

The number of seconds until the refresh token expires if you do not use the token. Each successful refresh resets the value to 24 hours, or less when the refresh token approaches its 30-day limit.

Example:

86400