Access Instructions (Must Read)

This page details the platform access public parameters, signature algorithm, multi-language configuration, common error codes, etc. Please read this page carefully before accessing.

Merchant Notice

  • MINI.GAME server time zone:UTC+0, the access party needs to pay attention to the time zone calculation of data statistics

  • The token returned by the MINI.GAME platform is valid for seven days and will be obtained again each time you re-enter (login)

  • After the account opening requirements are reviewed and approved, we will provide the merchant with a backend account. The merchant can view the app_id (merchant number) and key (signature key) through the backend.

  • In the document, {MINIGAME_APIURL} needs to be replaced with the test/production environment interface call address provided in the merchant backend interface. Check the merchant operation backend-settings-API access configuration-MINIGAME_APIURL, the interface provided by MINIGAME to the access party.

  • The configuration location of {ACCESS_URL} in the document: Merchant Operation Backend - Settings - API Access Configuration - ACCESS_URL, which is used for MINIGAME callback access party interface.

  • The {BACKEND_URL} configuration location in the document: Merchant Operation Backend-Settings-API Access Configuration-BACKEND_URL, which is used by the access party to query MINIGAME data.

  • In the interfaces provided by MINI.GAME, code=0 indicates success, while in the interfaces that need to be implemented by the integrator, code=1 indicates success.


Public parameters

All API calls made by the MINI.GAME platform to the integrator will include common parameters

Parameter
Location
Required
Type
Description

trace_id

url params

Yes

string

Defined and generated by the access party, the trace_id for each request is a unique value


Signature Algorithm and Example

sign = md5(parameters_in_url + json_string_in_body + signature_key)

Note that the JSON string in the body must be the original content from the request body, not the string generated by a JSON package. The final output should be in lowercase.

Name
Value

Request URL

{MINIGAME_APIURL}/api/Balance/GetBalance?trace_id=dhf1aboc1iio

Request method

POST

Content-Type

"application/json; charset=utf-8"

JSON data in request body

{“player_logon_token”:”b27cfe9b-f01c-11ee-a0b5-000c2901d9cc”,”account_id”:”1002402”,”timestamp”:1711971655}

Signature key

39a6581c31ef3203a22edb2daa2ab6d1

The string that needs to be MD5 encrypted

trace_id=dhf1aboc1iio{“player_logon_token”:”b27cfe9b-f01c-11ee-a0b5-000c2901d9cc”,”account_id”:”1002402”,”timestamp”:1711971655}39a6581c31ef3203a22edb2daa2ab6d1

The final MD5 encrypted string

e3f8dc79e875e46f6755ef540c2d24f3

CallBack

When the HTTP status code returned by the platform is 200, it indicates that the API request was successful, and the response can be parsed as expected. Any other HTTP error code indicates a network error. The returned Content-Type is "application/json; charset=utf-8".

{
    "code": 1,
    "msg": "success",
    "data": {
        "glist": [
            {
                "gameid": "2000002",
                "name": "Mines",
                "platform": "1",
            }
        ]
    }
}
Parameter
Type
说明

code

integer

The code represents the status code. A value of 1 indicates success, and the data returned by the API will be placed in the data parameter.

msg

string

Error message

data

object

Response Data

Last updated