Obtaining a demo game
Overview
| Request type | URL |
|---|---|
| GET | <server-pixmove-games>/game/demo |
This method allows you to obtain a link for opening the demo 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.
| Name | Type | Description | |
|---|---|---|---|
| partnerId | bigint | Unique partner identifier | |
| gameId | bigint | Unique game identifier | |
| language | string | optional* | Game localization language |
| returnUrl | string | optional* | Link for returning from the game back to the partner’s website |
| hash | string | Signature (sha256 from encryption string) |
String to hash
“demo” + partnerId + gameId + language* + returnUrl* + apiKey
Response
| Name | Type | Description |
|---|---|---|
| gameUrl | string | Link for opening the game in iFrame |
Example
Request
js
{
partnerId: 1,
gameId: 1,
hash: '504b47948ff3efe5247b9e369502e9e20b19752eaf3c6eb7f7354e75b09c61ac'
}Response
js
{
status: 'success'
data: {
gameUrl: '\<server-pixmove-games\>/pirate\_dice/?token=rzcvPWua8zjMw2'
}
}Errors
Possible error messages:
| Message | Description |
|---|---|
| RequiredParamsNotFound | Incorrect number of parameters in the request |
| InvalidParamType | Incorrect parameter type |
| PartnerNotFound | Partner with such partnerId not found |
| GameNotFound | Game with such gameId not found |
| IncorrectHash | Incorrectly calculated hash |
| ServerError | Server error |