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 NameDescriptionData typeRequired
playerTokenUnique token of the playerString (length: 255)Yes
gameCodecode name of the game. For example: “mahjong”, “kawaii-neko”, etc.,String (length: 255)Yes
brandCodeAuto-generated code of the brand in Naga Games’s databaseString (length: 4)Yes
groupCodeAuto-generated code of the group in Naga Games’s databaseString (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 NameDescriptionData type
nativeIdIdentifier of the player in Operator’s systemString (length: 255)
currencyCurrency of the playerString
balanceBalance of the playerDecimal (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!"
	}
}
Language
Click Try It! to start a request and see the response here!