Skip to main content

Game accounts

Game account operations are scoped to the authenticated player, current project and selected game server.

Create game account​

MutationdocumentId: createGameAccountauth: Bearer session

createGameAccount​

Description​

Creates a new game account for the authenticated player on the selected game server.

Input​

FieldTypeRequiredDescription
loginString!✓Game account login
passwordString!✓Password value.
prefixString-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​

Request
documentId: createGameAccount
{
"documentId": "createGameAccount",
"variables": {
"login": "GameLogin",
"password": "password123",
"prefix": "abc"
}
}
Response
200 OK
{
"data": {
"createGameAccount": {
"account": {
"login": "GameLogin",
"serverId": 1
},
"message": "Game account created"
}
}
}

Bind existing account​

MutationdocumentId: bindGameAccountauth: Bearer session

bindGameAccount​

Description​

Binds an existing game account to the authenticated master account.

Input​

FieldTypeRequiredDescription
loginString!✓Account login.
passwordString!✓Password value.
serverIdInt!✓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​

Request
documentId: bindGameAccount
{
"documentId": "bindGameAccount",
"variables": {
"login": "GameLogin",
"password": "password123",
"serverId": 1
}
}
Response
200 OK
{
"data": {
"bindGameAccount": {
"account": {
"login": "GameLogin",
"serverId": 1
},
"message": "Game account bound"
}
}
}

Refresh account list​

MutationdocumentId: refreshGameAccountsauth: Bearer session

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​

Request
documentId: refreshGameAccounts
{
"documentId": "refreshGameAccounts",
"variables": {}
}
Response
200 OK
{
"data": {
"refreshGameAccounts": [
{
"login": "GameLogin",
"serverId": 1,
"hidden": false
}
]
}
}

Hide or show account​

MutationdocumentId: hideGameAccountauth: Bearer session

hideGameAccount / showGameAccount​

Description​

Changes whether a game account is displayed in the player cabinet without deleting it.

Input​

FieldTypeRequiredDescription
accountLoginString!✓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​

Request
documentId: hideGameAccount
{
"documentId": "hideGameAccount",
"variables": {
"accountLogin": "GameLogin"
}
}
Response
200 OK
{
"data": {
"hideGameAccount": {
"account": {
"login": "GameLogin",
"serverId": 1,
"hidden": true
},
"message": "Game account hidden"
}
}
}

Game login credentials​

QuerydocumentId: getGameCredentialsauth: Bearer session

getGameCredentials​

Description​

Returns the selected game account credentials. When credential protection is enabled for the project, the master account PIN is required.

Input​

FieldTypeRequiredDescription
accountLoginString!✓Game account login
pinString-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​

Request
documentId: getGameCredentials
{
"documentId": "getGameCredentials",
"variables": {
"accountLogin": "GameLogin",
"pin": "1234"
}
}
Response
200 OK
{
"data": {
"getGameCredentials": {
"login": "GameLogin",
"password": "password123"
}
}
}