Skip to main content
POST
Generate Access Token

Rate Limit

This endpoint allows 30 requests per 10 minutes and 5 requests per minute. Both limits apply per client_id and client_secret pair. A 429 response includes a Retry-After header that gives the number of seconds to wait. Access tokens are reusable for their full lifetime. Generate one access token and reuse the token until the token approaches expiry, instead of calling this endpoint for every API request.

Determine the Token Expiry

The expires_in field gives the access token’s lifetime in seconds, counted from the moment MoEngage issues the token. Schedule your refresh from that value. The lifetime reflects the Access token expiration (in minutes) set on the API key, which defaults to 15 minutes. Send the access token on API requests as Authorization: Bearer <access_token>. For the request format and the authentication error codes, refer to Call the MoEngage Public APIs.

Body

application/x-www-form-urlencoded

The form-encoded credentials for the client credentials grant.

grant_type
enum<string>
required

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

Available options:
client_credentials
client_id
string
required

Your Workspace ID. The API key dashboard displays the Workspace ID at Settings > Account > API keys.

client_secret
string
required

The API key value. The dashboard displays the API key only once, when you create the key.

Response

MoEngage issued an access token and a refresh token. Store both tokens. The refresh token stays valid for 30 days.

status
string

The status of the request. The value is SUCCESS for a successful request.

Example:

"SUCCESS"

data
object