Skip to content

Authentication

Summary

Authentication method to access SkyJoy APIs

Methods


Retrieve Access Token

POST https://id.skyjoy.vn/realms/loyalty-partner/protocol/openid-connect/token

Parameters

NameTypeLocationRequiredDescription
client_idstringbodyYesClient ID
client_secretstringbodyYesClient secret
usernamestringbodyYesClient username
passwordstringbodyYesClient password
grant_typestringbodyYesGrant type
Content-TypestringheaderNox-www-form-urlencoded
sh
curl -X POST \
 --header 'Content-Type: x-www-form-urlencoded' \
 --data-urlencode 'client_id=<your client id>' \
 --data-urlencode 'client_secret=<your client secret>' \
 --data-urlencode 'username=<your client username>' \
 --data-urlencode 'password=<your client password>' \
 --data-urlencode 'grant_type=<your grant type>' \
 'https://id.skyjoy.vn/realms/loyalty-partner/protocol/openid-connect/token'

Refresh Token

POST https://id.skyjoy.vn/realms/loyalty-partner/protocol/openid-connect/token

Parameters

NameTypeLocationRequiredDescription
client_idstringbodyYesClient ID
client_secretstringbodyYesClient secret
grant_typestringbodyYesGrant type
refresh_tokenstringbodyNoRefresh token
Content-TypestringheaderNox-www-form-urlencoded
sh
curl -X POST \
 --header 'Content-Type: x-www-form-urlencoded' \
 --data-urlencode 'client_id=<your client id>' \
 --data-urlencode 'client_secret=<your client secret>' \
 --data-urlencode 'grant_type=<your grant type>' \
 --data-urlencode 'refresh_token=<your refresh token>' \
 'https://id.skyjoy.vn/realms/loyalty-partner/protocol/openid-connect/token '

Exchange Token

POST https://api.skyjoy.vn/api-identity/public/v1/exchange-token

Parameters

NameTypeLocationRequiredDescription
tokenstringbodyYesPartner token. It is a JWT token signed by partner private key
Content-TypestringheaderYesapplication/json
sh
curl -X POST \
 --header 'Content-Type: application/json' \
 -d '{"token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi..."}' \
 'https://api.skyjoy.vn/api-identity/public/v1/exchange-token'

SkyJoy Integration Documentation