Authentication related messages
Authenticate via email
Field name | Type | Required | Description | Default value |
---|---|---|---|---|
type |
string | Y | Value must be AuthEmail | |
email |
string | Y | Authentication email address | |
password |
string | Y | Authentication password | |
create |
boolean | N | If the user is not created yet, create new one | false |
Example request:
Please check Authenticate response message
Authenticate via device id
Please check Authenticate response message
Authenticate via custom id
Please check Authenticate response message
Refreshing token
Regenerating token with new expire date.
Field name | Type | Required | Description |
---|---|---|---|
type |
string | Y | Value must be RefreshToken |
token |
string | Y | Valid Authentication token |
Example request:
{
"type": "RefreshToken",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NzA1Mjg3MTEsInVzZXIiOnsiaWQiOiJiMDhkN2I3OS0xNDA1LTQxZGMtODJhMS02YTg4MjU3OWM3MmEiLCJzZXNzaW9uIjoiM2IxMzdjYWUtZmY1OC00NjY5LTg1YjctOWEyM2NiOGRiYzAxIiwibmFtZSI6bnVsbCwiZW1haWwiOiJlcmhhbmJhcmlzQGdtYWlsLmNvbSJ9fQ.6tLnsjWPRCz0cW00j2nzV-SUk6GwrlYgxe9V_p5mhxU"
}
Please check Authenticate response message
Restoring session
The user should be restore token after reconnecting to the system. If timeout exceeded, the session will be terminated and active game and player will be informed.
Field name | Type | Required | Description |
---|---|---|---|
type |
string | Y | Value must be RestoreToken |
token |
string | Y | Valid Authentication token |
Example request:
{
"type": "RestoreToken",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NzA1Mjg3MTEsInVzZXIiOnsiaWQiOiJiMDhkN2I3OS0xNDA1LTQxZGMtODJhMS02YTg4MjU3OWM3MmEiLCJzZXNzaW9uIjoiM2IxMzdjYWUtZmY1OC00NjY5LTg1YjctOWEyM2NiOGRiYzAxIiwibmFtZSI6bnVsbCwiZW1haWwiOiJlcmhhbmJhcmlzQGdtYWlsLmNvbSJ9fQ.6tLnsjWPRCz0cW00j2nzV-SUk6GwrlYgxe9V_p5mhxU"
}
Please check Authenticate response message
Logout
Terminates the current session and active game and player will be informed.
Authenticate response message
All authentication response message structure is the same.
Field name | Type | Nullable | Description |
---|---|---|---|
status |
boolean | N | Value should be true |
type |
string | N | Value should be Authenticated |
token |
string | N | User's authentication token |
Example response:
{
"status": true,
"type": "Authenticated",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NzI3NzE2NTQsInVzZXIiOnsiaWQiOiJiMDhkN2I3OS0xNDA1LTQxZGMtODJhMS02YTg4MjU3OWM3MmEiLCJzZXNzaW9uIjoiZWJiNWNkNzctM2M2Ni00NTQ2LTk2OGQtYTNjOGMwNTBiMjczIiwibmFtZSI6bnVsbCwiZW1haWwiOiJlcmhhbmJhcmlzQGdtYWlsLmNvbSIsInVzZXJfdHlwZSI6MX19.k2eM1xV4XnUx33f0pBVUD_lLgIcw0K1l2DOpJueG7g8"
}