This endpoint is called when a player is attempting to launch a game. A game is launched using the URL generated from the getContentURL (sessions) endpoint in the MG+ API.
POST {base_url}/login
Request Data
|
Name |
Required |
Data Type |
Description |
|---|---|---|---|
|
playerId |
Yes |
String (50) |
System ID of the player. |
|
contentCode |
Yes |
String (50) |
The content code for which the login was requested for. |
|
operatorLoginToken |
Optional |
String (50) |
Optional tracking identifier provided by the operator during the Sessions API request, enabling the operator to identify the origin of the game launch request. |
Example Request
{
"playerId": "test_player",
"contentCode": "SMG_BlackJack",
"operatorLoginToken": "CABe1EsFAAA"
}
Response Data
|
Name |
Required |
Data Type |
Description |
|---|---|---|---|
|
balance |
Yes |
Number |
Available player balance.
|
|
currency |
Yes |
String (3) |
Currency code assigned to the player. |
|
extOperatorToken |
Optional |
String (150) |
Optional tracking identifier that may be passed back on subsequent requests for this player during the game session. If not provided it will clear any previous value that might have been set. |
Example Response
{
"currency": "CNY",
"balance": 2050.50,
"extOperatorToken": "tracertoken77"
}
HTTP Response Codes
|
Status Code |
Description |
Example |
|---|---|---|
|
200 |
OK |
|
|
401 |
API Token expired or not valid |
|
|
404 |
Any error |
Player cannot be found, or player should not log in, etc. |
|
432 |
Validation of request failed |
operatorLoginToken or contentCode validation failed. |