> ## Documentation Index
> Fetch the complete documentation index at: https://doc.va777.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Get game link

> Get game link: request parameters, response format and response codes.

> [!NOTE]
>
> * A game link is valid for 300 seconds. After that, it expires and can no longer be used.
> * Members can play the game in a single window only.
> * If app is Y, we remove the bet details button from the game. To view bet details, use [Get bet record detail](https://doc.va777.net/en/v1/api-reference/betlog/detail.md).
> * Pass game ID 0 to get the game lobby link; otherwise pass the game ID.

## Path

```text theme={null}
GET {host}/api/v2.0/game/gameLink
```

## Headers

<table>
  <colgroup>
    <col width="27%" />

    <col width="10%" />

    <col width="7%" />

    <col width="56%" />
  </colgroup>

  <thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td>`Authorization`</td><td>string</td><td>Yes</td><td>Token we provide</td></tr>
  </tbody>
</table>

## Request parameters

<table>
  <colgroup>
    <col width="27%" />

    <col width="10%" />

    <col width="7%" />

    <col width="11%" />

    <col width="45%" />
  </colgroup>

  <thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Signed</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td>`channelId`</td><td>number</td><td>Yes</td><td>✓</td><td>Channel ID (use 1 if you have no channels)</td></tr>
    <tr><td>`account`</td><td>string</td><td>Yes</td><td>✓</td><td>Member account (allowed characters: `a-z A-Z 0-9 _-`)</td></tr>
    <tr><td>`currency`</td><td>string</td><td>Yes</td><td>✓</td><td>Currency (contact our business team)</td></tr>
    <tr><td>`gameId`</td><td>number</td><td>Yes</td><td>✓</td><td>Game ID (0: game lobby, other: game ID)</td></tr>
    <tr><td>`gamePlat`</td><td>string</td><td>Yes</td><td>✓</td><td>Platform the game opens on (web or mobile)</td></tr>
    <tr><td>`app`</td><td>string</td><td>Yes</td><td>✓</td><td>Opened from an app (Y: hide the game history feature, N: show it)</td></tr>
    <tr><td>`lang`</td><td>string</td><td>Yes</td><td>✓</td><td>Game language (contact our business team)</td></tr>
    <tr><td>`clientIp`</td><td>string</td><td>Yes</td><td /><td>Player IP</td></tr>
    <tr><td>`url`</td><td>string</td><td>No</td><td /><td>Return URL (must start with http\:// or https\://)</td></tr>
    <tr><td>`muteMusic`</td><td>boolean</td><td>No</td><td /><td>Mute music (true: muted, false: not muted; defaults to false)</td></tr>
    <tr><td>`muteSound`</td><td>boolean</td><td>No</td><td /><td>Mute sound effects (true: muted, false: not muted; defaults to false)</td></tr>
    <tr><td>`sign`</td><td>string</td><td>Yes</td><td /><td>Signature. See [Signature](https://doc.va777.net/en/v1/guides/signature.md) for how to generate it</td></tr>
  </tbody>
</table>

## Response

Success (the HTTP status code is always 200; check `status.code` for the result)

<table>
  <colgroup>
    <col width="34%" />

    <col width="12%" />

    <col width="54%" />
  </colgroup>

  <thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td>`data`</td><td>object</td><td /></tr>
    <tr><td>`data.url`</td><td>string</td><td>Game link</td></tr>
    <tr><td>`data.token`</td><td>string</td><td>Game token for this session</td></tr>
    <tr><td>`status`</td><td>object</td><td>Response status. See [Response format](https://doc.va777.net/en/v1/guides/request-format.md#response-format)</td></tr>
  </tbody>
</table>

### Response example

```json theme={null}
{
  "data": {
    "url": "http://xxx-xx.xxxx/xxxx.xxxx?xx=xxxxxxxxx",
    "token": "35f990b7adda4cb9a25601cf6bf690bd"
  },
  "status": {
    "code": "0",
    "message": "success",
    "datetime": "2022-07-01T10:13:54.920+08:00",
    "traceCode": "7cf25e1957cc47fe8e01f1a7c6d504d6"
  }
}
```

## Response codes

Besides the [common codes](https://doc.va777.net/en/v1/reference/response-codes.md), this API may also return:

| Code | Description |
| - | - |
| `103` | Request failed on our side |
| `205` | Account does not exist |
| `206` | Game does not exist |
| `207` | Wallet processing error |
| `800` | Risk control error |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.