Authentication
Checks a launch token and tells the game who the player is and what they can play with.
Path
/authMethod
POSTContent-Type
application/jsonHeaders
X-Client-IDX-Client-TSX-Client-SignatureAppended to your wallet base URL. Signed: see Securing requests.
When we call it
- When the game opens with a
tokenin its URL. - Again whenever the player reloads the game or their connection drops and comes back, with the same token.
Request
| Parameter | Type | Description |
|---|---|---|
user_tokenrequired | string | The launch token from the game URL. |
tokenrequired | string | The same token again (older wallets read this field). |
platformrequired | string | Device type. Currently always mobile. |
currencyrequired | string | The game server's currency, e.g. KES. |
Request body
{
"user_token": "8f3c1d2e9b7a4c5d8e1f2a3b4c5d6e7f",
"token": "8f3c1d2e9b7a4c5d8e1f2a3b4c5d6e7f",
"platform": "mobile",
"currency": "KES"
}Response
| Field | Type | Description |
|---|---|---|
coderequired | integer | 200 when the player was found. |
messagerequired | string | ok, or the reason for a refusal. |
data.user_idrequired | string | The player's ID on your side. The game sends it back on every later call. |
data.balancerequired | number | The player's balance, in the amount unit agreed for your integration. |
data.usernameoptional | string | Display name. Other players only ever see it masked (j***u). |
data.phoneoptional | string | Kept on our side for support; never shown to other players. |
data.currencyoptional | string | The balance currency, e.g. KES. |
Response
{
"code": 200,
"message": "ok",
"data": {
"user_id": "100245",
"username": "jkamau",
"phone": "254712345678",
"balance": 1500.5,
"currency": "KES"
}
}Result codes
| Code | Meaning |
|---|---|
200 | Token valid: the player plays. |
401 | Token unknown or expired: the player is asked to reopen the game from your site. |
403 | Account blocked or self-excluded. |
Every method: see Result codes.