POST
Maya Mini App partner shall create this endpoint following the API contract below. This endpoint should also use POST method.
What Maya expects from your Session URL during session initiation:
- Your Session URL should be able to receive the API request from the Maya Mini App
- Your Session URL should be able to generate a unique
sessionId
for each API request. ThissessionId
should for one-time use only - Your Session URL should be able to acknowledge the API request from the Maya Mini App by responding with
sessionId
Before executing any complex logic that may cause a timeout, your session URL should promptly respond withsessionId
in a successful status code (2xx). Implementing this approach would benefit your customer's rendering duration and redirection speed to your landing page.
- Your Session URL should save the token details (such as the
accessToken
,refreshToken
,expiryAt
, etc.) received from Maya Mini App
Technical Guide:
Request Payload to Receive
Request Header
Attribute | Type | Format | Description |
---|---|---|---|
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 |
Request 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) |
Response Payload to Return
Response Body
Attribute | Type | Format | Description |
---|---|---|---|
sessionId REQUIRED | string | AN(255) | Must be URL-safe and must be valid for one-time use only. Recommended: UUIDv4 format. |