Oauth

Change grant token into access token or refresh access token

post/oauth/token

Request body

grant_typestring

OAuth token grant type. Use refresh_token to refresh access token. Use authorization_code to exchange grant into access token

client_idstring

Application client ID in Moka app dashboard

client_secretstring

Application client secret in Moka app dashboard

codestring

Moka merchant's authorization code

redirect_uristring

Redirect URL of your application in Moka app dashboard

refresh_tokenstring

Refresh token that can be used to obtain a new access token when access token is expired. Note: To obtain a new access token with refresh token, make sure the grant_type is set to refresh_token

Response

Exchange token response

access_tokenstring

Access token that can be used to access Moka's APIs

token_typestring

Token type used by Moka's APIs (always returns bearer)

expires_ininteger

Time of token expiration in Epoch format

refresh_tokenstring

Refresh token that can be used to obtain a new access token when access token is expired. Note: To obtain a new access token with refresh token, make sure the grant_type is set to refresh_token

scopestring

Scopes provided to the access token. This is configured when creating the application in the Moka developer platform

created_atstring

Time of token creation or token refresh in Epoch format

Changes

No recorded changes to this endpoint across all 1 revision of this API.