POST https://op-sandbox.paymaya.com/tokens
This API endpoint uses Bearer Authentication, which relies on the Client Credentials Token (access_token
) generated during OAuth 2.0 Authentication using the client_credentials
grant type. You must provide this token as part of the Authorization header.
--header Authorization: Bearer <access_token>
Recipes
📖
Refresh User Access Token in Maya Mini App
Open Recipe
Technical Guide:
Related Guide:
Request Payload
Request Header
Attribute | Type | Format | Description |
---|---|---|---|
Accept REQUIRED | string | application/json | |
Content-Type REQUIRED | string | application/json | Specifies the media type of the request |
Request-Reference-No REQUIRED | string | UUIDv4 | Unique reference identifier for tracking the request |
Authorization REQUIRED | string | JWS | The Client Credentials Token (access_token ) generated by Maya during OAuth 2.0 Authentication using the client_credentials grant typeExample: Bearer {access_token} |
Request Body
Attribute | Type | Format | Description |
---|---|---|---|
refreshToken REQUIRED | string | application/json | The valid Customer Refresh Token obtained from Maya through either your session URL or acquired by refreshing the tokens , whichever is the most recent or valid value |
Response Payload
Response Body
Attribute | Type | Format | Description |
---|---|---|---|
accessToken REQUIRED | string | JWE | The Customer Access Token; Your application should store this securely while also considering the expiration |
refreshToken REQUIRED | string | JWT | Token for getting a new access token; Your application should store this securely while also considering the expiration |
expiresAt REQUIRED | integer | Timestamp of the session expiration, in seconds since the epoch (UNIX timestamp) |