llms.txt API v1 · 2026-11-02
Wallet API钱包回调接口

Authenticate认证玩家

Called once during games/launch: exchange the launch token for the player.games/launch 时调一次:用进游戏 token 换玩家信息。

POST{callbackUrl}/auth

Implemented by the merchant · called by the platform商户实现 · 平台调用 · timeout超时 5 s

Called during games/launch. Validate the token and return the player.

在 games/launch 时调用。校验 token,返回玩家信息。

tokenstring
The token from games/launch.games/launch 里的 token。
platformstring
Platform being launched.要进的平台。
extPlayerIdstringrequired必填
The player bound to the token.token 对应的玩家。
currencystringrequired必填
The player's currency — becomes the bound currency on first launch.玩家币种,第一次进游戏时成为绑定币种。
balancestringrequired必填
Current balance.当前余额。
nicknamestringoptional可选
Used if the launch request had none.进游戏请求没带昵称时使用。
langstringoptional可选
Used if the launch request had none.进游戏请求没带语言时使用。

Token policy is yours (lifetime, single use). We call /auth once per launch. For the conformance test you provide one long-lived test token (API conformance test).

token 的有效期、是否一次性由商户决定。每次进游戏时平台调用一次 /auth。对接测试需要商户提供一个长期有效的测试 token(接口对接测试)。

Result codes结果码

In addition to the common codes listed in另可能返回通用结果码,见 Result codes结果码.

Test cases测试用例

The conformance test sends the following 3 requests to /auth. Each response must match the expected result exactly.接口对接测试会向 /auth 发送以下 3 个请求,每个响应都必须与期望结果完全一致。 All test cases全部测试用例

AUTH-01 blocking阻断级 Authentication with a valid token有效 token 认证 Expected期望 OK
/auth {token: TK}
extPlayerId matches ^[A-Za-z0-9_-]{1,64}$; currency is enabled on the platform; balance is a valid amount. P and C are recorded. A failure aborts the test.extPlayerId 符合 ^[A-Za-z0-9_-]{1,64}$;currency 为平台已开通币种;balance 为合法金额。记录 P 与 C。失败则测试中止。
AUTH-02 blocking阻断级 Authentication with an invalid token无效 token 认证 Expected期望 INVALID_TOKEN
/auth {token: <random>}
No player data is returned.不返回玩家数据。
AUTH-03 warning警告级 Repeated authentication with the same token同一 token 重复认证 Expected期望 OK
/auth {token: TK}
extPlayerId and currency are identical to AUTH-01.extPlayerId 与 currency 与 AUTH-01 一致。