GetPlayerToken

GetPlayerToken

URl: https://{{gmag_api_url}}/player/getToken?hash={{xxx}}.

Method: POST.

Purpose: In order to start the game for a player, the brand should retrieve a valid player token from the GM-Ag system. The GM-Ag system stores player tokens for up to 1 hour. It means that the same token can be used for up to 1 hour, however it is recommended to use the getPlayerToken method every time a new game is being launched for the player.


Request

Name

Type

Required

Description

Name

Type

Required

Description

playerId

String(24)

Yes

The unique ID identified a Player on brand’s side.

Response

Name

Type

Required

Description

Name

Type

Required

Description

token

String(256)

Yes

A token to launch a game for a player.

Request example

{ "requestId": "requestId1234", "brandId": 1001, "playerId": "playerid1" }

Response example

//success { "requestId": "requestId1234", "token": "token12314", "error": "0", "message": "success", } //error { "requestId": "requestId1234", "error": "P_02", "message": "Invalid hash", }