|
@@ -1,13 +1,12 @@
|
|
|
# <font > Get Key</font>
|
|
|
## Description
|
|
|
->To obtain a new key for launching the game, provide currency for the initial login. If no account exists, a new account will be created automatically.
|
|
|
+>To get a new key for player to launch game. Need to provide currency for the first login. System will create new account automatically if it does not exist
|
|
|
|
|
|
-> Request method:( Host-> BeSoft):post
|
|
|
+>request method:(Host -> BeSoft):post ;
|
|
|
|
|
|
-> Encoding method:application/x-www-form-urlencoded
|
|
|
-
|
|
|
-> Besoft The response data format is: application/json
|
|
|
+>encoding method:application/x-www-form-urlencoded
|
|
|
|
|
|
+>Besoft format of the outgoing request data: application/json
|
|
|
|
|
|
## Method URL
|
|
|
>{besoftapi}/api/game/getKey
|
|
@@ -18,40 +17,44 @@
|
|
|
| -------- | -------- | -------- | -------- |
|
|
|
| cert | string | Y | security code |
|
|
|
| user |string (30) | Y | unique user id (only allow lower case a-z and 0-9) BY WEBSITE)|
|
|
|
-| extension1 | string(20) | Y | agent Id from ARS,belong to website |
|
|
|
+| extension1 | string(20) | Y | Agent ID(Can be used for login, each proxy account can only be used for a single operator) |
|
|
|
|
|
|
|
|
|
|
|
|
## Example
|
|
|
-- URL:
|
|
|
- - http://127.0.0.1:8000/api/game/getKey
|
|
|
-- HTTP Method
|
|
|
- - POST
|
|
|
-- Form Data
|
|
|
- > Content-Type: application/x-www-form-urlencoded
|
|
|
- ```
|
|
|
- cert:v8VMKKzlPpD0te4rX99Hgefs3PQrBFWJKiuUqg6Y
|
|
|
- user:test1
|
|
|
- extension1:adminweb
|
|
|
+
|
|
|
+- **URL**:
|
|
|
+ - `http://127.0.0.1:8000/api/game/getKey`
|
|
|
+
|
|
|
+- **HTTP Method**:
|
|
|
+ - `POST`
|
|
|
+
|
|
|
+- **Form Data**:
|
|
|
+ > Content-Type: `application/x-www-form-urlencoded`
|
|
|
+
|
|
|
+ ```
|
|
|
+ cert: v8VMKKzlPpD0te4rX99Hgefs3PQrBFWJKiuUqg6Y
|
|
|
+ user: test1
|
|
|
+ extension1: adminweb
|
|
|
```
|
|
|
-
|
|
|
|
|
|
## Return Result
|
|
|
| Name | Type | Description |
|
|
|
| -------- | -------- | -------- |
|
|
|
-| status | string | status code |
|
|
|
-|key |string | access token (default valid time: 10 minutes)|
|
|
|
-|returnurl |string | Return the URL for logging into the game. When logging into a specific game, include the 'kindid' for the specified game.|
|
|
|
+| status | string | status code |
|
|
|
+|key |string | unique identifier token generated upon each login |
|
|
|
+|returnurl |string | Return the URL to log in to the game, with gid parameter required to specify the game for login|
|
|
|
|
|
|
|
|
|
## Successful Result
|
|
|
|
|
|
```
|
|
|
{
|
|
|
-"status": 1,
|
|
|
- "key": "o7301PFJ6FkBQSTJpilxNgOnSVZfMb2rtdZGZAUCPxIAIJdfPCJKVbWBnjNeN256QjE8K19lO7S2SYWMPVQWy8",
|
|
|
- "returnurl": "https://127.0.0.1:8000/?key=o7301PFJ6FkBQSTJpilxNgOnSVZfMb2rtdZGZAUCPxIAIJdfPCJKVbWBnjNeN256QjE8K19lO7S2SYWMPVQWy8"
|
|
|
- }
|
|
|
+ "status": 1,
|
|
|
+ "key": "50iD5lzhlTAJqJepJcz4PWohVW0uXYwhTtMeixqdsgcT4ErSso9i17i8AZ247kEZVHO4oVDloDgCjeAulbX T4I",
|
|
|
+ "returnurl": "http://127.0.0.1:8000/?key=50iD5lzhlTAJqJepJcz4PWohVW0uXYwhTtMeixqdsgcT4ErSso9i17i8AZ247kEZVHO4oVDloDgCjeAulbXT4I"
|
|
|
+}
|
|
|
+
|
|
|
```
|
|
|
|
|
|
## Failed Result
|
|
@@ -61,55 +64,52 @@
|
|
|
|
|
|
## Login
|
|
|
|
|
|
-### Descripti on
|
|
|
->Invoke this method with your “Key” (returned by GetKey API) to launch game.
|
|
|
+### Description
|
|
|
+>Returnurl(provided by the getkey API) to invoke this method to start the game (with gid specifying a specific game and lang specifying the game language), where a player can only enter one game at a time and cannot simultaneously enter multiple games.
|
|
|
|
|
|
->Game return description: After the game is closed, the return address (return_url= the parameter of the return address), if not filled in, the game has no return button.
|
|
|
+>Request method:(Host-> BesoftFront):GET;
|
|
|
|
|
|
+>Game return description: After the game is closed, the return address (return_url= the parameter of the return address), if not filled in, the game has no return button.
|
|
|
|
|
|
## Method URL
|
|
|
```
|
|
|
-http://{BesoftFront}/?key=3F6AE577A2E2255EF4BACF02C9F8BB1154A9C6AD2F19701
|
|
|
-568BA675BDA3C46BCA64D243007F87C86119329271708&gid=be001&lang=en&return_url=https://returnyoururl.com
|
|
|
+http://{BesoftFront}/?key=3F6AE577A2E2255EF4BACF02C9F8BB1154A9C6AD2F19701568BA675BDA3C46BCA64D243007F87C86119329271708&gid=aa0001&lang=en&return_url=https://returnyoururl.com
|
|
|
|
|
|
```
|
|
|
|
|
|
> New interface: If you need to close the current window directly, please use the window.open mode to open, and do not need to pass the return_url
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
> New interface: If the parameter return_url is added, please encode the parameter in URLEncoding mode
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
> Embedded interface: If it is embedded, please listen for this message notification (closeMessage), the game manufacturer closes the game's call interface
|
|
|
|
|
|
-
|
|
|
```
|
|
|
{
|
|
|
window.parent.postMessage("closeMessage", "*")
|
|
|
}
|
|
|
|
|
|
-
|
|
|
```
|
|
|
|
|
|
|
|
|
+
|
|
|
## Request Parameter
|
|
|
|
|
|
| Name | Type | Required | Description |
|
|
|
| -------- | -------- | -------- | -------- |
|
|
|
| acc | String(30) | Y | User ID |
|
|
|
-| key |string(86) | Y |1.Key value returned by “GetKey” , 2.Please do URLEncoding on it while using the HTTP GET method) |
|
|
|
+| key |string(86) | Y |Key value returned by “GetKey”Please do URLEncoding on it while using the HTTP GET method |
|
|
|
| aid | string(20) | Y | Agent Id |
|
|
|
-| nick | string (50) | Y | User name Only Support 16 Unicode characters |
|
|
|
-| gid| Integer | Y| input gameId as default launch game ; if blank, go to lobby. |
|
|
|
-| lang| string | Y| default is cn , cn : simplified Chinese , en : english |
|
|
|
-| return_url | string | N | return_url=Game off return address,Please encode the parameters in URLEncoding mode |
|
|
|
-
|
|
|
+| gid | string | Y | Default launching game; if blank, go to lobby. |
|
|
|
+| lang | string | Y | Default is cn; cn: simplified Chinese en : english |
|
|
|
+| return_url | string | N | return_url=Game off return address,Please encode the parameters in URLEncoding mode |
|
|
|
## Return Result
|
|
|
-
|
|
|
+{
|
|
|
+ "status": 1,
|
|
|
+ "key": "50iD5lzhlTAJqJepJcz4PWohVW0uXYwhTtMeixqdsgcT4ErSso9i17i8AZ247kEZVHO4oVDloDgCjeAulbXT4I",
|
|
|
+ "returnurl": "http://127.0.0.1:8000/?key=50iD5lzhlTAJqJepJcz4PWohVW0uXYwhTtMeixqdsgcT4ErSso9i17i8AZ247kEZVHO4oVDloDgCjeAulbXT4I"
|
|
|
+}
|
|
|
### Successful Result
|
|
|
|
|
|
>Redirect Browser to game hall page
|