Get Player Information

The Game Server Hit the App Server to get Player Information

Request URL:

  • Provided By You

  • Should Be protected by SSL (https)

  • Method: GET

Request Parameters:

Param
Val
Required
Description

token

String

YES

The User API Authoriaztion Token

game_id

String

YES

The Game ID You received from Game-ox.com

lang

String

NO

sign

String

YES

MD5 Hash. game_id + token

Response parameters

Param
Val
Required
Description

error_code

Int

YES

0 if no errors 1 if any error occurs

error_message

String

YES

null if no errors string message if any error occurs

data

Object

YES

Player Data Object

Player Data Object

Param
Val
Required
Description

name

String

YES

Player nickname

uid

String

YES

Player Unique Identifier

avatar

String

YES

Player Avatar Image URL

coins

Int

YES

Player Current Coins

Sample Request:

https://an-api-link-provided-by-you?token=xx&game_id=xx&lang=xx&sign=c1ecccfa8ff75c90ea62b3b386aecb48

Sample Response (success) :

{
    "error_code": 0,
    "error_message": null,
    "data": {
        "name": "John Doe",
        "uid": "1232323",
        "avatar": "https://gravatar.com/avatar/a38c4e594847fe7d38b01ab07abfaa36",
        "coins": 999
    }
}

Sample Response (error):

{
    "error_code": 1,
    "error_message": "Cannot get user info",
    "data": 
}

Last updated