3.2 Launch Game (取得进入游戏网址)
Description (说明)
This API call is used to let player login and launch specific game
本功能用于让玩家登入与开启指定游戏。
URL (网址)
https://{host}/api/launch_game
Request Method
POST
Request Parameters (请求参数)
| Field (栏位) | Type (型态) | Required (必要) | Description (说明) |
|---|---|---|---|
| agentId | String | Y | Agent ID <= 50 characters 代理帐号 |
| userId | String | Y | User ID <= 50 characters 玩家帐号 |
| gameType | String | Y | Game Type <= 10 characters 游戏类型 v23.10.3 update |
| gameCode | String | Y | Game Code <= 20 characters 游戏代码 v23.10.3 update |
| tableId | Number | N | Specify Table ID (Specify the table number to enter.) 指定进入的桌号 v23.12.5.1 update |
| lang | String | N | Language fixed 2 characters 语言 default: EN 预设: EN |
| sound | Boolean | N | Enable Sound 启用声音 default: true 预设: true |
| homePageUrl | String | N | Specify the url to return to the operator's home page. <= 3000 characters 指定返回营运商主页的 URL need to set http:// or https:// 需要设置 http:// or https:// Supported Game Type 支援游戏类型
|
| betLimits | Array of Number | N | Update the player's bet limit array size <= 6 更新玩家的下注限红 up to six groups of bet limit id can be set 最多可设定六组 Bet Limit ID Example 范例:[900001,900002,900003] |
| identity1 | String | N | unique identifier 1 唯一识别码 1 |
| identity2 | String | N | unique identifier 2 唯一识别码 2 |
| allowNoCommBet | Boolean | N | Allow betting with no commission (If this parameter is not sent,then use the setting of website) true: on、false: off if the setting of website is off, then this setting is off 允许开启免佣下注(未带值,依支线设定) true: 开启、false: 关闭 若支线设定为关闭时,该参数视为关闭 Supported Game 支援游戏
|
| allowHedgeBetting | Boolean | N | Allow headge betting (If this parameter is not sent, then use the setting of website) true: on、false: off if the setting of website is off, then this setting is off 允许开启对赌下注(未带值,依支线设定) true: 开启、false: 关闭 若支线设定为关闭时,该参数视为关闭 |
{
"agentId": "hrgag",
"userId": "hrgpl0001",
"gameType": "LIVE",
"gameCode": "BACCARAT",
"lang": "EN",
"sound": true,
"homePageUrl": "https://www.google.com/",
"betLimits": [
900001,
900002,
900003
]
}
Return Result (返回结果)
| Field (栏位) | Type (型态) | Description (说明) |
|---|---|---|
| code | String | Status Code fixed 4 characters 状态码 |
| data | Object | |
| url | String | Game URL 游戏链结 |
{
"code": "0000",
"data": {
"url": "https://{gamepage}/?lang=EN&sound=true&gameType=LIVE&gameCode=BACCARAT&x=Q2cA1qPvyUo26TzfM_dUgWTV5wDQ1gbAt8AgyEYgFAfOO1iopp1DEEwppfwW92akPCbsbp-Cmk95KXGiNEntz1nG2aRUcGnfex4UlCBTWdhhXchsyws5B1Xwt4QeP10d1t6JCqE77peH5IyHcdu41w=="
}
}
Sample Request For Each Language (各语言请求范例)
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"userId\":\"hrgpl0001\",\"lang\":\"EN\",\"sound\":true,\"gameType\":\"LIVE\",\"gameCode\":\"BACCARAT\",\"homePageUrl\":\"https://www.google.com/\",\"betLimits\":[900001,900002,900003]}");
Request request = new Request.Builder()
.url("https://{host}/api/launch_game")
.method("POST", body)
.addHeader("Authorization", "Basic TWpNQ0JSM1NFYnBrYXdSNTpNak1DQlIzU0VicGthd1I1")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();