Game Launch
In this guide, we will look at how to retrieve and launch Buffalo games using the token obtained from the previous step. Before integrate the game launch, the operator need to implement the check Api first to make the buffalo game can validate user's session id (sid). Check Api protocol
Flow Chart
This endpoint allows you to retrieve and launch game with the provided token.
Request attributes
- Name
operatorId- Type
- string
- Description
Unique identifier for the operator. The operator can get the operator id from the support team
- Name
gameTypeId- Type
- string
- Description
The game that need to be launched. Please refer the additional description page to get the gameTypeId. Additional Description
- Name
player- Type
- Object
- Description
The user information object
- Name
player.userId- Type
- string
- Description
The user's id from the operator side
- Name
player.currency- Type
- string
- Description
The user's currency. Please refer the additional description page to see the supportive currency. Additional Description
- Name
player.language- Type
- string
- Description
The user's language. The buffalo game will present the language in the game by this attribute. Please refer the additional description page to see the supportive language. Additional Description
- Name
player.sid- Type
- string
- Description
The user session id of this game connection. The API interaction from the buffalo game will all include this session id to make operator validate the request. The operator should make sure this sid is unique and also maintain the relation between sid and user id.
- Name
player.name- Type
- string
- Description
The user name that operator want to present in the Buffalo Game. The default value will be 'anonymous'.
- Name
apiSecret- Type
- string
- Description
The operator secret key. The operator can get the key from the interaction support
Response attributes
- Name
errCode- Type
- number
- Description
The errCode
- Name
vals- Type
- object
- Description
The result parent data
- Name
vals.id- Type
- number
- Description
The random number for tracing
- Name
vals.type- Type
- number
- Description
The response type
- Name
vals.data- Type
- Object
- Description
The main information of response
- Name
vals.data.redirectUrl- Type
- string
- Description
The game url
Request
curl --location '{BASE_URL}/launch' \
--header 'Content-Type: application/json' \
--data '{
"operatorId": "op001",
"gameTypeId": "minesweeper",
"player": {
"userId": "balance_test_userId",
"currency": "USD",
"language": "en",
"sid": "4bc38561ad314bb9985aece6e6abce5b",
"name": "user A"
},
"apiSecret": "7s9D32fKl82Slz56Dl9v3n3l1z8D32fK"
}'
Response
{
"errCode": 0,
"vals": {
"type": 12,
"id": 37971,
"data": {
"redirectUrl": "https://minesweeper.{ENVIRONMENT}.buffalo888.com?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcGVyYXRvcklkIjoib3AwMDEiLCJnYW1lVHlwZUlkIjoibWluZXN3ZWVwZXIiLCJwbGF5ZXIiOnsicGxheWVySWQiOiJiYWxhbmNlX3Rlc3RfdXNlcklkIiwiY3VycmVuY3kiOiJVU0QiLCJsYW5ndWFnZSI6ImVuIiwic2Vzc2lvbiI6IjRiYzM4NTYxYWQzMTRiYjk5ODVhZWNlNmU2YWJjZTViIn0sImFwaVNlY3JldCI6IjdzOUQzMmZLbDgyU2x6NTZEbDl2M24zbDF6OEQzMmZLIiwiaWF0IjoxNzI0OTE2Mzc0LCJleHAiOjE3MjY5ODk5NzR9.lDoxVLIngu5LmnOvdpWBCO-F7GQUfVnZgLcoIn64hAM&lang=en"
}
}
}