Authenticate Users
When a player launches a game, THNDR will make a server-to-server request to the Operator to validate the session and authenticate the user.
This ensures that the sessionId provided during game launch is valid and not expired.
Endpoint
GET {operatorURL}/thndr/sessions/{sessionToken}Path Parameters
operatorURL- Base URL of the Operator’s API.sessionToken- The session token originally provided by the Operator when launching the game. It should be single-use and expire very quickly.
Expected Response
{
"userId": "{USER_ID}",
"displayName": "{DISPLAY_NAME}",
"sessionId": "{OPTIONAL_SESSION_ID}",
"currency": "{OPTIONAL_USER_CURRENCY}",
"subOperatorId": "{OPTIONAL_SUB_OPERATOR_ID}",
"brandId": "{OPTIONAL_BRAND_ID}",
"isTest": false
}userId- Unique identifier of the player on the Operator’s platform.displayName- Player’s display name, safe for public display within THNDR games.sessionId- Must be a valid UUID if provided. If omitted, the API will treat the path parametersessionTokenas the session ID.currency- Player's wallet currency (read more in Currencies).subOperatorId- Optional, 1–50 characters. For aggregators: identifies the operator you're integrating on behalf of. It is fixed to the player when the account is first created. For brands under a single operator, usebrandIdinstead.brandId- Optional. Identifies the brand the player is playing under, for operators that run several brands. If sent, it must be a string of 1–50 characters. We record it on the player's session and on every round they play, for reporting by brand. Leave it out or send null if you don't use brands.isTest- Optional boolean. Marks the player as a test account. It is set the first time we see the player and can't be changed later. Leave it out (or send null) to keep the stored value.
Error Handling
If the session is invalid, expired, or otherwise not usable, the Operator should return:
Signature Verification
Verify the request signature using “sessionId” as the request payload. More in the Request Signing section.
Example signed payload:
Last updated