Player
The player API is responsible for creating players or updating exisitng player informati
Player
POST
/integrations/player
The API call is used to create or update a player details in Gameball with the provided attributes
Headers
Name | Type | Description |
---|---|---|
APIKey | string | Client API key |
Request Body
Name | Type | Description |
---|---|---|
levelOrder | integer | An integer representing the logical order of the configured level. IMPORTANT: manual player leveling is available under special circumstances and is not available by default. Contact us for more info. |
playerAttributes | object | An object containing all of the attributes of the player. Player object is described in Object Reference section. |
playerUniqueId | string | Player unique identifier used to uniquely identify the player on Gameball. |
Response Description
Attribute | Description |
| Player ID on Gameball |
Choose an Unchangeable Player Unique ID
Gameball user profile gets created using the playerUniqueId
. It is highly recommended to have the unique ID as an identifier that would NEVER be changed. If this unique ID changes for a given player, you risk losing all original data for that player and hence losing their points and rewards on Gameball. Accordingly, it is NOT recommended to use email address or mobile number as the unique ID as both can be changed by the user at anytime.
Usage Example
The example shown is a request sent to Gameball to create a player with playerUniqueId
“player123”and with some custom attributes inside the custom
Object.
All attributes should be inside the playerAttributes
object, if the values of any attributes shown below are unavailable, remove the attribute from the playerAttributes
object.
Navigate through different tabs to view the APIs for each language.
Player Info
POST
/integrations/player/info
The API call is used to retrieve player's info.
Headers
Name | Type | Description |
---|---|---|
Lang | string | Preferred language to get your player's info in. |
APIKey | string | Client API Key |
Request Body
Name | Type | Description |
---|---|---|
playerUniqueId | string | Player unique identifier used to uniquely identify the player on Gameball. |
hash | string | Hashed body with SHA1 algorithm. As described in Hashing Transaction Messages section. Note: hash is automatically handled when using server-side SDKs. |
Response Description
Attribute | Description |
| Player's Display Name |
| Referral Code |
| Referral URL |
| Score object used to describe the player's score at Gameball. Score Object is described in Object Reference section. |
| Level object used to describe the player's current level at Gameball. Level Object is described in Object Reference section. |
| Points object used to describe the player's points at Gameball. Points Object is described in Object Reference section. |
| An object containing all of the attributes of the player. Player Object is described in Object Reference section. |
Examples
The example shown is a request sent to Gameball to get a player info with playerUniqueId
“player456”and with the hash
.
Attach Tags
POST
/integrations/player/tags
Used to attach tags to a Player
Headers
Name | Type | Description |
---|---|---|
APIKey | string | Client API Key |
Request Body
Name | Type | Description |
---|---|---|
playerUniqueId | string | Player unique identifier used to uniquely identify the player on Gameball |
tags | string | Comma separated string of tags to be attached to the player |
Detach Tags
DELETE
/integrations/player/tags
Used to detach tags from Player
Headers
Name | Type | Description |
---|---|---|
APIKey | string | Client API Key |
Request Body
Name | Type | Description |
---|---|---|
playerUniqueId | string | Player unique identifier used to uniquely identify the player on Gameball |
tags | string | Comma separated string of tags to be detached from the player |
Last updated