Get User Game Token

Retrieve the token used by the user in games on the MINI.GAME platform.

Authorize

This API is provided by the MINI.GAME platform and is called by the integrator.

POST {MINIGAME_APIURL}/api/player/v1/authorize?trace_id=your_trace_id

{MINIGAME_APIURL}is the MINI.GAME API domain, which can be obtained from the backend.

Headers

Name
Value

Content-Type

"application/json; charset=utf-8"

sign

"your_sign_string"

Please refer to the Signature Algorithm and Example page for details on the signature algorithm.

Body

Name
Type
Description

appid

string

The unique identifier for the merchant, available in the merchant backend.

timestamp

integer

Timestamp (in seconds)

nickname

string

User's Nickname

uname

string

User ID must be unique

Integrator Request Parameter Example

{
    "appid": "13",
    "timestamp": 1711954264,
    "nickname": "Kate",
    "uname": "1024",
}

MINIGAMEPlatform Response Parameter Example

{
    "data": {
        "token": "1003803",
        "balance": "42766.25",
        "appid":1024
    },
    "code": 0,
    "msg": "ok"
    }
}

Response Example Parameter Descriptions

Name
Required
Type
Description

data

Yes

object

Response Data

token

Yes

string

The token of the player on the MINI.GAME platform. Subsequent operations on this player's data must include this token, for example: checking the player's balance, recharging the player, etc.

balance

Yes

decimal

User Balance, supports up to 4 decimal places.

appid

Yes

string

The appid of the merchant to which the player belongs.

code

Yes

integer

Status Code

msg

Yes

string

Prompt message

Error Code

For more error codes, please refer to the General Error Codes page description.

Last updated