Skip to main content

Create Player

Create a new game player account.

API Information​

  • URL: POST /v2/members
  • Authentication: Bearer Token
  • Encryption: Requests are encrypted using AES-256-GCM; responses are returned as plaintext JSON

request​

Request Headers​

POST /v2/members HTTP/1.1
Host: api.example.com
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
x-agentid: integratorNBTest04
x-timestamp: 1769746894501
x-nonce: 56ffd5ecd8a3a4457863a0bd7c298fb2
x-signature: 904e97bee2589b93e9747eed0346c68b23d8ff8b568dabaf4b94a5e89093df67

Request Parameters​

Request parameters need to be encrypted and placed in cipherText Field.

Parameters Before Encryption​

{
"username": "player001",
"siteId": "site01"
}

Encrypted Request​

{
"cipherText": "G0ZMDELeJwx+7JcIfIFOLJjkSzANPu6krGM2uw==bDUB6MvLbggJM4Df28x/41LlgIPDqPBBAylkqTdB0I78haWOdi6jV8JXAi0iL8JHq/cCPlj39Apt..."
}
FieldTypeRequiredDescription
usernamestringYesPlayer Account, unique identifier, refer to notes for creation rules
siteIdstringNoSite ID, used for multi-site management

Response​

Success Response​

{
"code": 0,
"message": "No error.",
"logUUID": "24cdc3b9-9fe8-44de-8391-a96863e46954"
}

Error Response​

When the request fails, the corresponding error code will be returned.

Error Codes​

CodeDescriptionHandling Suggestion
6The username already existPlayer Account already in use, please use another Player Account
11Parameters errorPlease ensure the request parameters are complete and correctly formatted (username must be 1-25 letters or numbers)

Error Response Example​

{
"code": 6,
"message": "The username already exist.",
"logUUID": "6589bf8d-fe74-48bd-841a-71bf8f848f86"
}
{
"code": 11,
"message": "Parameters error",
"logUUID": "6589bf8d-fe74-48bd-841a-71bf8f848f86"
}

Important Notes​

  1. Player Account Uniqueness: Each Player Account under the same agentId must be unique
  2. Player Account Format Restrictions: Maximum 50 characters, alphanumeric only, both uppercase and lowercase letters allowed
  3. Site ID Format Restrictions: Minimum 3 characters, maximum 20 characters, alphanumeric only, both uppercase and lowercase letters allowed
  4. Site ID Immutable Restriction: Once created, it is not easily changed, please name and confirm carefully