Game accounts
Game account operations are scoped to the authenticated player, current project and selected game server.
Create game account
createGameAccount
Description
Creates a new game account for the authenticated player on the selected game server.
Input
| Field | Type | Required | Description |
|---|---|---|---|
login | String! | ✓ | Game account login |
password | String! | ✓ | Password value. |
prefix | String | - | Optional account prefix. |
Result
Response type - GameAccountResult.
Errors
UNAUTHENTICATED- the user is not authenticated.VALIDATION- the login, password or required prefix is invalid.LOGIN_EXISTS- the game account already exists.MAX_ACCOUNTS_REACHED- the configured account limit was reached.CREATE_FAILED- the game server did not create the account.
Exchange example
{
"documentId": "createGameAccount",
"variables": {
"login": "GameLogin",
"password": "password123",
"prefix": "abc"
}
}
{
"data": {
"createGameAccount": {
"account": {
"login": "GameLogin",
"serverId": 1
},
"message": "Game account created"
}
}
}
Related types
Bind existing account
bindGameAccount
Description
Binds an existing game account to the authenticated master account.
Input
| Field | Type | Required | Description |
|---|---|---|---|
login | String! | ✓ | Account login. |
password | String! | ✓ | Password value. |
serverId | Int! | ✓ | Game server ID. |
Result
Response type - GameAccountResult.
Errors
UNAUTHENTICATED- the user is not authenticated.INVALID_CREDENTIALS- the game account login or password is invalid.LOGIN_EXISTS- the account is already bound in the current project.BIND_DISABLED- account binding is disabled for the server.MAX_ACCOUNTS_REACHED- the configured account limit was reached.
Exchange example
{
"documentId": "bindGameAccount",
"variables": {
"login": "GameLogin",
"password": "password123",
"serverId": 1
}
}
{
"data": {
"bindGameAccount": {
"account": {
"login": "GameLogin",
"serverId": 1
},
"message": "Game account bound"
}
}
}
Related types
Refresh account list
refreshGameAccounts
Description
Returns the authenticated player's game accounts for the selected login server.
Input
The operation does not accept variables.
Result
Response type - [GameAccount!]!.
Errors
UNAUTHENTICATED- the user is not authenticated.
Exchange example
{
"documentId": "refreshGameAccounts",
"variables": {}
}
{
"data": {
"refreshGameAccounts": [
{
"login": "GameLogin",
"serverId": 1,
"hidden": false
}
]
}
}
Related types
Hide or show account
hideGameAccount / showGameAccount
Description
Changes whether a game account is displayed in the player cabinet without deleting it.
Input
| Field | Type | Required | Description |
|---|---|---|---|
accountLogin | String! | ✓ | Game account login |
Result
Response type - GameAccountResult, containing the updated account and a message.
Errors
UNAUTHENTICATED- the user is not authenticated.GAME_ACCOUNT_NOT_FOUND- the account does not belong to the authenticated player in the current scope.
Exchange example
{
"documentId": "hideGameAccount",
"variables": {
"accountLogin": "GameLogin"
}
}
{
"data": {
"hideGameAccount": {
"account": {
"login": "GameLogin",
"serverId": 1,
"hidden": true
},
"message": "Game account hidden"
}
}
}
Related types
Game login credentials
getGameCredentials
Description
Returns the selected game account credentials. When credential protection is enabled for the project, the master account PIN is required.
Input
| Field | Type | Required | Description |
|---|---|---|---|
accountLogin | String! | ✓ | Game account login |
pin | String | - | Confirmation PIN code. |
Result
Response type - GameCredentials.
Errors
UNAUTHENTICATED- the user is not authenticated.GAME_ACCOUNT_NOT_FOUND- the account was not found in the current player and server scope.PIN_REQUIRED- the project requires a master account PIN for this operation.INVALID_PIN- the supplied PIN is invalid.
Exchange example
{
"documentId": "getGameCredentials",
"variables": {
"accountLogin": "GameLogin",
"pin": "1234"
}
}
{
"data": {
"getGameCredentials": {
"login": "GameLogin",
"password": "password123"
}
}
}