Skip to content

Common & Transfer Introduction

Each section in the API sidebar usually represents a specific endpoint. In this case, we’re using the game_lobby endpoint as an example.


  • Route: /game_lobby
  • Method: GET

NameTypeRequiredDescription
agent_idstring-
timenumberUnix Timestamp
datastringBase64 Encoded Data
keystringMD5 Hash Key
api_base_url/api/v2/game_lobby?
agent_id=sampleApiId&time=1747896074
&data=dXNlcl9pZD...
&key=77f9856869...
  • HTTP Status: 200
interface IGameLobby {
result_code: number
response_data: {
game_url: string
}
}

Follow the steps outlined in the section to construct the request.

PropertyTypeRequiredDefaultDescription
user_idstring-
currencystring     -Example:
KRW,USD,JPY,CNY,PHP,
HKD,THB,VND,BDT,INR
languagestring-Example:
KO = Korean, EN = English,
CN = Chinese, JP = Japanese.
home_urlstring-
feedback_data1     string-
bet_n_minnumber-
bet_n_maxnumber-
bet_t_minnumber-
bet_t_maxnumber-
bet_r_minnumber-
bet_r_maxnumber-

Before you send a request, you must know this and the following:

FieldDescriptionHow to get it
API ID or Agent IdAgent identifierFrom your agent account
API Key or Agent KeySecret key for the IDInside your account’s information tab
API Base URLServer addresse.g. http://stage.dwclub6789.com:9000/api/v2

  1. Each required property should be formatted as key=value. Then, concatenate all such properties using the & character to form a single string.

    Example:

    user_id=sampleUserId&currency=KRW&language=KO&home_url=https://sample.com
    &bet_n_max=50000&bet_n_min=50&bet_t_max=50
    &bet_t_min=1000&bet_r_max=50&bet_r_min=1000
  2. After structuring the data as a concatenated string in the key=value format separated by &, encode the entire string using Base64 encoding.

    Sample Code:

    const structuredData =
    'user_id=sampleUserId&currency=KRW&language=KO&home_url=https://sample.com&bet_n_max=50000&bet_n_min=50&bet_t_max=50&bet_t_min=1000&bet_r_max=50&bet_r_min=1000';
    const base64EncodedData = Buffer.from(structuredData).toString('base64');
    // Output: dXNlcl9pZD...

    Sample Output:

    dXNlcl9pZD0yNzEwdDAwMSZjdXJyZW5jeT1LUlcmbGFuZ3VhZ2U9S08maG9tZV91cmw9aHR0cHM6Ly9zYW1wbGUuY29tJmJldF9uX21heD01MDAwMCZiZXRfbl9taW49NTAmYmV0X3RfbWF4PTUwJmJldF90X21pbj0xMDAwJmJldF9yX21heD01MCZiZXRfcl9taW49MTAwMCZhcGlfaWQ9c2FtcGxlQXBpSWQmYXBpX2tleT1jYjM1MTUwYTQ0NmQ0ZDM4YTI3ODk0ZDQ2MzIxZDVlMA==
  3. To prepare the data for hashing, concatenate API Id, Unix Timestamp, API Key, and the Base64-encoded data in that exact order, without adding any delimiters between them.

    API Id + Unix Timestamp + API Key + Base64 Encoded Data
    sampleApiId1747888709cb35150a446d4d38a27894d46321d5e0dXNlcl9pZD0yNzEwdDAwMSZjdXJyZW5jeT1LUlcmbGFuZ3VhZ2U9S08maG9tZV91cmw9aHR0cHM6Ly9zYW1wbGUuY29tJmJldF9uX21heD01MDAwMCZiZXRfbl9taW49NTAmYmV0X3RfbWF4PTUwJmJldF90X21pbj0xMDAwJmJldF9yX21heD01MCZiZXRfcl9taW49MTAwMCZhcGlfaWQ9c2FtcGxlQXBpSWQmYXBpX2tleT1jYjM1MTUwYTQ0NmQ0ZDM4YTI3ODk0ZDQ2MzIxZDVlMA==
  4. Use the MD5 hash function to compute the hash of the concatenated data string.

    // API Id + Unix Timestamp + API Key + Base64 Encoded Data
    const preHashData =
    'sampleApiId1747888709cb35150a446d4d38a27894d46321d5e0dXNlcl9pZD0yNzEwdDAwMSZjdXJyZW5jeT1LUlcmbGFuZ3VhZ2U9S08maG9tZV91cmw9aHR0cHM6Ly9zYW1wbGUuY29tJmJldF9uX21heD01MDAwMCZiZXRfbl9taW49NTAmYmV0X3RfbWF4PTUwJmJldF90X21pbj0xMDAwJmJldF9yX21heD01MCZiZXRfcl9taW49MTAwMCZhcGlfaWQ9c2FtcGxlQXBpSWQmYXBpX2tleT1jYjM1MTUwYTQ0NmQ0ZDM4YTI3ODk0ZDQ2MzIxZDVlMA==';
    const hashKey = crypto.createHash('md5').update(preHashData).digest('hex');
    // Output: fb362519233ae647d7906d7ebbe0a72e
  5. Structure the request URL as follows:

    const requestUrl =
    `${api_base_url}/api/v2/game_lobby?` +
    `agent_id=${apiId}&` +
    `time=${unixTimestamp}&` +
    `data=${base64EncodedData}&` +
    `key=${hashKey}`;
  6. Request URL Usage.

    Sample Usage:

    const response = await axios.get(requestUrl);
    const data = response.data;
    /*
    Output:
    {
    "result_code": 0,
    "response_data": {
    "game_url": "https://game_url.com/api/game_lobby/?token=eyJhbGciOiJIUzI1NiIs..."
    }
    }
    */

    Sample Response:

    {
    "result_code": 0,
    "response_data": {
    "game_url": "https://game_url.com/api/game_lobby/?token=eyJhbGciOiJIUzI1NiIs..."
    }
    }