Download OpenAPI specification:
This API suite provides a unified and standardized interface for accessing multiple game provider platforms through a single integration.
Instead of integrating with each game provider individually (each with their own authentication, request formats, and error handling), this platform aggregates and normalizes all supported game provider APIs into one consistent API specification.
All endpoints in this API suite:
Use HTTP POST
Accept JSON request bodies
Require HMAC-based authentication
Return a standardized response format
| Credential | Description |
|---|---|
Base URL |
Base URL for all API requests |
ApiKey |
Unique identifier for the operator, begins with key_ |
Secret |
Secret key used for HMAC signature generation, begins with secret_ |
All requests must be authenticated using API Key + HMAC Signature.
| Header | Required | Description |
|---|---|---|
ApiKey |
Yes | Unique identifier for the operator, begins with key_ |
Timestamp |
Yes | Unix timestamp in seconds representing request time |
Signature |
Yes | HMAC-SHA256 signature (Base64 encoded) |
Each request must include a valid Signature header.
The signature is generated using HMAC-SHA256 and Base64 encoding.
message = raw_request_body + request_path + timestamp
Where:
raw_request_body = exact raw JSON payload (no formatting changes)
request_path = full request URL path (including query string if any)
timestamp = value of the Timestamp request header
$data = \Yii::$app->request->getRawBody();
$path = \Yii::$app->request->url;
$timestamp = \Yii::$app->request->headers->get('Timestamp');
$message = $data . $path . $timestamp;
$expected_signature = base64_encode(
hash_hmac('sha256', $message, $secret, true)
);
The generated value must be sent in the Signature header.
Requests are time-sensitive.
Requests with timestamps outside the allowed time window will be rejected.
Ensure server clocks are synchronized (NTP recommended).
HTTP Method: POST only
Content-Type: application/json
Body: JSON object (may be empty {} for some endpoints)
Character Encoding: UTF-8
Raw Body Integrity: Any modification (whitespace, formatting, ordering) after signature generation will invalidate the request.
All API responses follow the same structure:
{
"code": 0,
"message": "Success",
"data": {}
}
| Field | Type | Description |
|---|---|---|
code |
integer | Business-level response code (0 = success) |
message |
string | Human-readable description |
data |
mixed | Response payload (object or array) |
Note:
Even when HTTP status is200, the request may still fail logically. Always check thecodefield.
| Code | Description |
|---|---|
| 40000 | Bad request |
| 40001 | API key is required |
| 40002 | Timestamp is required |
| 40003 | Signature is required |
| 40004 | Required parameter is missing |
| 40005 | Invalid parameter value |
| 40006 | Invalid game |
| 40007 | Game function not implemented |
| 40008 | Invalid username |
| 40009 | Username already used |
| 40010 | Operator reference ID already exists |
| 40011 | Insufficient credit limit |
| 40012 | Transaction not found |
| Code | Description |
|---|---|
| 40300 | Forbidden |
| 40301 | Unknown API key |
| 40302 | Expired request |
| 40303 | Signature mismatch |
| Code | Description |
|---|---|
| 40500 | Method not allowed |
| Code | Description |
|---|---|
| 50000 | Internal server error |
| 50001 | Game provider API exception |
Incorrect raw request body used during signature generation
Mismatch between request URL path and signed path
Timestamp drift between client and server
Invalid or inactive API key
Incorrect secret key
Always generate the signature after constructing the final request body
Do not pretty-print or re-encode JSON after signing
Use server-side time for timestamp generation
Log full request data when debugging signature issues (excluding secrets)
Get the Operator's remaining credit balance in Redirect2U.
| ApiKey | string |
| Timestamp | string |
| Signature | string |
{ }{- "code": 0,
- "message": "Success",
- "data": {
- "credit_balance": 49999900
}
}Get the list of Game Providers that Redirect2U supports.
| ApiKey | string |
| Timestamp | string |
| Signature | string |
{ }{- "code": 0,
- "message": "Success",
- "data": [
- {
- "code": "jili",
- "name": "JILI",
- "app_links": [ ],
- "implements_reset_password": false,
- "implements_logout_player": true,
- "implements_game_list": true,
- "login_mode": "lobby"
}
]
}Get the list of Products that the Game Provider has.
| ApiKey | string |
| Timestamp | string |
| Signature | string |
| game_code required | string The Game to get the Product list. |
{- "game_code": "richgaming"
}{- "code": 0,
- "message": "Success",
- "data": [
- {
- "id": "4600",
- "name": "Mahjong Rich",
}, - {
- "id": "4100",
- "name": "Sunshine Party",
}
]
}Create a new player account in Game Provider platform.
| ApiKey | string |
| Timestamp | string |
| Signature | string |
| game_code required | string The Game Provider to create the player account in. |
| username required | string The desired username. |
{- "game_code": "richgaming",
- "username": "dddadgsdc"
}{- "code": 0,
- "message": "Success",
- "data": {
- "id": "dddadgsdc",
- "username": "dddadgsdc",
- "password": null,
- "balance": 0
}
}Get the player's account's remaining balance in Game Provider platform.
| ApiKey | string |
| Timestamp | string |
| Signature | string |
| game_code required | string The Game Provider to get player's account details from. |
| username required | string The username. |
{- "game_code": "richgaming",
- "username": "dddadgsdc"
}{- "code": 0,
- "message": "Success",
- "data": {
- "balance": 0
}
}Generate the login token or retrieve all necessary information needed for the player to login to their account in the Game Provider platform.
| ApiKey | string |
| Timestamp | string |
| Signature | string |
| game_code required | string The Game Provider to launch game in. |
| username required | string The username. |
| product_id | string The Product that the player wants to play. If the Game Provider's login_mode=direct-game, this parameter is required. Otherwise, it is ignored. |
{- "game_code": "richgaming",
- "username": "dddadgsdc"
}{- "code": 0,
- "message": "Success",
- "data": {
- "login_mode": "username-password",
- "username": "dddadgsdc",
- "password": "abcd1234",
}
}Logout the player's game session in the Game Provider platform.
| ApiKey | string |
| Timestamp | string |
| Signature | string |
| game_code required | string The Game Provider to logout player's account from. |
| username required | string The username. |
{- "game_code": "richgaming",
- "username": "dddadgsdc"
}{- "code": 0,
- "message": "Success",
- "data": true
}Perform a Deposit into the player's account in the Game Provider platform.
| ApiKey | string |
| Timestamp | string |
| Signature | string |
| game_code required | string The Game Provider to deposit into. |
| username required | string The username. |
| amount required | integer The amount to deposit into the Game Provider. |
| operator_reference_id required | string Operator's reference identifier. |
{- "game_code": "richgaming",
- "username": "dddadgsdc",
- "amount": 10,
- "operator_reference_id": "00000009"
}{- "code": 0,
- "message": "Success",
- "data": {
- "username": "dddadgsdc",
- "operator_reference_id": "00000009",
- "game_api_transaction_id": null,
- "platform_transaction_id": 9,
- "amount": 10,
- "balance": 20
}
}Perform a Withdraw from the player's account in the Game Provider platform.
| ApiKey | string |
| Timestamp | string |
| Signature | string |
| game_code required | string The Game Provider to withdraw from. |
| username required | string The username. |
| amount required | integer The amount to withdraw from the Game Provider. |
| operator_reference_id required | string Operator's reference identifier. |
{- "game_code": "richgaming",
- "username": "dddadgsdc",
- "amount": 10,
- "operator_reference_id": "00000010"
}{- "code": 0,
- "message": "Success",
- "data": {
- "username": "dddadgsdc",
- "operator_reference_id": "00000010",
- "game_api_transaction_id": null,
- "platform_transaction_id": 10,
- "amount": -10,
- "balance": 10
}
}Check the status of a Deposit or Withdraw transaction.
| ApiKey | string |
| Timestamp | string |
| Signature | string |
| game_code required | string The Game Provider to withdraw from. |
| username required | string The username. |
| operator_reference_id required | string Operator's reference identifier. |
{- "game_code": "richgaming",
- "username": "dddadgsdc",
- "operator_reference_id": "00000002"
}{- "code": 0,
- "message": "Success",
- "data": {
- "username": "dddadgsdc",
- "operator_reference_id": "00000010",
- "game_api_transaction_id": null,
- "platform_transaction_id": 10,
- "amount": -10,
- "balance": 10
}
}| ApiKey | string |
| Timestamp | string |
| Signature | string |
| game_code required | string The Game Provider to pull the Game Log from. |
| username | string The username. |
| start_time required | integer The start time to pull the Game Log from. Condition used: |
| end_time required | integer The end time to pull the Game Log until. Condition used: |
{- "game_code": "richgaming",
- "username": "dddadgsdc",
- "start_time": 1767021054,
- "end_time": 1767024655
}{- "code": 0,
- "message": "Success",
- "data": {
- "page": 1,
- "page_size": 20,
- "total_count": 1,
- "total_pages": 1,
- "results": [
- {
- "id": "1",
- "timestamp": "1767024654",
- "username": "dddadgsdc",
- "product_id": "1",
- "product_name": null,
- "bet": "0.20",
- "win": "0.00",
- "begin_balance": null,
- "after_balance": null
}
]
}
}Get Credit Logs for a specific Game Provider platform.
| ApiKey | string |
| Timestamp | string |
| Signature | string |
| game_code required | string The Game Provider to pull the Credit Log from. |
| username | string The username. |
| start_time required | integer The start time to pull the Credit Log from. Condition used: |
| end_time required | integer The end time to pull the Credit Log until. Condition used: |
{- "game_code": "richgaming",
- "username": "dddadgsdc",
- "start_time": 1767021054,
- "end_time": 1767024655
}{- "code": 0,
- "message": "Success",
- "data": {
- "page": 1,
- "page_size": 20,
- "total_count": 1,
- "total_pages": 1,
- "results": [
- {
- "platform_transaction_id": "10",
- "timestamp": "1767457105",
- "username": "dddadgsdc",
- "operator_reference_id": "00000010",
- "game_api_transaction_id": null,
- "begin_balance": "20.00",
- "amount": "-10.00",
- "after_balance": "10.00"
}, - {
- "platform_transaction_id": "9",
- "timestamp": "1767457104",
- "username": "dddadgsdc",
- "operator_reference_id": "00000009",
- "game_api_transaction_id": null,
- "begin_balance": "10.00",
- "amount": "10.00",
- "after_balance": "20.00"
}
]
}
}