Skip to content

Obtaining a game ​

Overview ​

Request typeURL
GET<server-pixmove-games>/game/init

This method allows you to obtain a link for opening the game in iFrame.

Notice

The request is executed by the partner.

Parameters ​

Request ​

Optional fields are excluded from hash calculations.
Optional* fields are included in hash calculations only if they are provided.

Parameters minBet, maxBet and maxWin are considered only if the sessionId parameter is provided.

NameTypeDescription
currencystringThe currency in which the game will be played
partnerIdbigintUnique partner identifier
gameIdbigintUnique game identifier
playerIdstringUnique player identifier in the partner’s system
sessionIdstringoptional*Unique game session identifier in the partner’s system, which will be passed in all subsequent requests
languagestringoptional*Game localization language
returnUrlstringoptional*Link for returning from the game back to the partner’s website
hashstringSignature (sha256 from encryption string)
minBetstringoptionalMinimum available bet amount within a game session
maxBetstringoptionalMaximum available bet amount within a game session
maxWinstringoptionalMaximum win amount within a game session
nicknamestringoptionalPlayer's nickname
countryCodestringoptionalPlayer's country code within a game session

String to hash

"game" + currency + partnerId + gameId + playerId + sessionId* + language* + returnUrl* + apiKey

Response ​

NameTypeDescription
gameUrlstringLink for opening the game in iFrame

Example ​

Request ​

js
{  
    currency: 'USD',  
    partnerId: 1,  
    gameId: 1,  
    playerId: '132',  
    sessionId: '123',
    minBet: '5',  
    hash: '5ac72c7cec4949fc3d268dee6bff0394c3378a3a0ed21727d5523d272638a430'  
}

Response ​

js
{  
    status: 'success'  
    data: {  
        gameUrl: '\<server-pixmove-games\>/pirate\_dice/?token=rzcvPWua8zjMw2'  
    }    
}

Errors ​

Possible error messages:

MessageDescription
RequiredParamsNotFoundIncorrect number of parameters in the request
InvalidParamTypeIncorrect type of parameter
CurrencyNotFoundCurrency with such code not found
PartnerNotFoundPartner with such partnerId not found
GameNotFoundGame with such partnerId not found
IncorrectHashIncorrectly calculated hash
ServerErrorServer error