Backend Interface Overview
Player Network provides a comprehensive set of backend interfaces to support business operations.To access these backend APIs, first configure your game in the Player Network Console.
Do not conduct stress tests in the Player Network SDK production environment.If the game needs to stress test its own modules, it is recommended to simulate Player Network SDK's authentication requests.For load testing of account services, please contact Player Network Assistant in advance.
Backend interfaces have permission controls. If non-LI PASS clients or third-party platforms using backend HTTPS face permission errors (e.g., 10000), contact Player Network Assistant to apply for the relevant interface permissions.
Basic Structure
- Interface Protocol: HTTPS
- Character Encoding: UTF-8
- Header:
Content-Type: application/json - Interface Timeout: 8,100 ms
- Server URL: Depends on the deployment cluster configured in the Player Network Console.Get server URL information required for business from the console Retrieve Deployment Cluster Information.
URL Format
The standard URL format for backend interface requests is:
https://test.intlgame.com/v2/auth/verify_login?os=1&gameid=11&channelid=1&ts=1528097722&sdk_version=0.1&sig=xxx
\_______________________/\___________________/ \______________________________________________________________/
Server URL Endpoint Path Query Parameters
Authentication
Player Network backend interfaces use hash codes to verify requests.For more information on hash values (sig parameter), please contact Player Network Assistant.
Query Parameters
| Parameters | Type | Description | Remarks |
|---|---|---|---|
| os | string | Operating system identification 1: Android 2: iOS 3: Web 4: Linux 5: Windows 6: Nintendo 7: Mac 8: PlayStation 9: Xbox 11: Xbox Series X|S (XSX) 12: WinGDK | Required |
| gameid | string | Game ID assigned by Player Network | Required |
| channelid | int | Login channel ID 1: WeChat 2: QQ 3: Guest 4: Facebook 5: GameCenter 6: GooglePlay 9: X 10: Garena 14: LINE 15: Apple 19: VK 20: Xbox 21: Steam 24: Epic 26: Discord 27: PlayStation 5 30: DMM 32: SquareEnix 33: Supercell 35: Kakao 38: VNG 41: Nintendo Switch | Required |
| ts | uint | Unix time | Required |
| sig | string | Hash value used to verify requests. Please contact Player Network Assistant for details. | Required |
| source | int | Access source 0 or empty: Client SDK 1: Game backend | Required |
| sdk_version | string | SDK version carried Defaults to empty | Clients need to carry with all calls |
| seq | string | Parameter for transparent transmission Included in the returned JSON string for asynchronous calls Only allows English letters, numbers and underscores (_) Defaults to empty | Optional |
Request Example
curl -sS -X POST -H 'Content-Type: application/json' 'https://test.intlgame.com/v2/auth/verify_login?channelid=11&gameid=11&os=5&source=0&ts=1590481177&sdk_version=2.0&sig=9d3a9c7257d445ae0b1ff31a4d69c16e'
-d '{"openid":"5574152457717116678","token":"1d9d1dea1c094be1ddfeb9ef48f7f0aad72b5a8b"}'
Token Length
The length of the token varies in different scenarios. Currently, the token length does not exceed 2048 bytes.As future plans may change the maximum token length, it is recommended that your application supports variable-length tokens.
Response and Error Description
After sending data via the HTTP protocol, obtain the status code.If the status code is not 200, the request has failed. Print the result directly to inspect the issue.If the status code is 200, the request is normal, and the HTTP response content can be fetched to parse the JSON string into an array.
The response package format is as follows:
{
"ret": 0,
"msg": "user is logged in"
}
- ret = 0 indicates the request was successful.Can parse relevant return field information.
- ret != 0 indicates the request logic failed.
msgcontains specific error information, no other fields returned.
For the complete ret value list, see Backend Error Codes.