When the game is opened, Naga Games receives a game URL that includes an identity token (Player Token) generated by operators. Naga Games then uses this token to request Operators for player authentication.
Request
API URL : {OperatorAPIDomain}/{OperatorEndpoint}
HTTP Method : POST
Body Parameters
- data (JSON)
Must contain all fields below.
Parameter Name | Description | Data type | Required |
---|---|---|---|
playerToken | Unique token of the player | String (length: 255) | Yes |
gameCode | code name of the game. For example: “mahjong”, “kawaii-neko”, etc., | String (length: 255) | Yes |
brandCode | Auto-generated code of the brand in Naga Games’s database | String (length: 4) | Yes |
groupCode | Auto-generated code of the group in Naga Games’s database | String (length: 4) | Yes |
- dataHash (String)
All request data coming from Naga Games would be hashed using SHA-256 as a data checksum and signed with the Private Key, which was generated for each operator using the RSA signing algorithm.
Header Parameters
- x-signature (String)
Must be generated from signing process with correct order of data fields & privateKey.
About Signing & Verifying dataHash & Signature
Refer ➡️ How to signing & verify dataHash and signature for Seamless mode?
About Data & Signature Generation
An operator must process the data in the same order ( data order and the number of data fields passed ) as specified by Naga Games to get the result from the API. Please make sure that the signature generated is valid before requesting, as different data will generate different signature and will result in error ( happens if any order or any data is missing or invalid during the signature generation process ).
Refer ➡️ Data Order before Stringify & Hashing.
Response
Body Parameters:
JSON Array
Parameter Name | Description | Data type |
---|---|---|
nativeId | Identifier of the player in Operator’s system | String (length: 255) |
currency | Currency of the player | String |
balance | Balance of the player | Decimal (20,2) |
Success Response Example (HTTP status code 200)
{
"data": {
"nativeId": "MMK_SugaryBonanza",
"currency": "MMK",
"balance": 19878207132
}
}
Failure Response Example (HTTP status code 400)
{
"data": null,
"error": {
"statusCode": 400,
"message": "Cannot verify data!"
}
}