# Game Launch

This is an API used to retrieve the launch link for a casino player.

## Launch Game

Launches a slot or live game and returns a URL for the player.

### Endpoint

```
POST https://api.nexusggr.com
```

**Content-Type:** `application/json`

### Request

**Method:** `game_launch`

#### Slot game

```json
{
    "method": "game_launch",
    "agent_code": "your_agent_code",
    "agent_token": "your_agent_token",
    "user_code": "test",
    "provider_code": "PRAGMATIC",
    "game_code": "vs20doghouse",
    "lang": "en",
    "rtp": 92,
    "lobby_url": "https://your-site.com/lobby"
}
```

#### Live game

```json
{
    "method": "game_launch",
    "agent_code": "your_agent_code",
    "agent_token": "your_agent_token",
    "user_code": "test",
    "provider_code": "EVOLUTION",
    "game_code": "nxpkul2hgclallno",
    "lang": "en",
    "lobby_url": "https://your-site.com/lobby"
}
```

> For live games, `game_code` is optional. When empty, a lobby URL is returned.

<table><thead><tr><th width="140">Field</th><th width="86">Type</th><th width="116">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>method</code></td><td>string</td><td>Yes</td><td>Must be <code>game_launch</code></td></tr><tr><td><code>agent_code</code></td><td>string</td><td>Yes</td><td>Your agent code</td></tr><tr><td><code>agent_token</code></td><td>string</td><td>Yes</td><td>Your agent API token</td></tr><tr><td><code>user_code</code></td><td>string</td><td>Yes</td><td>Player identifier, no whitespace</td></tr><tr><td><code>provider_code</code></td><td>string</td><td>Yes</td><td>Provider code</td></tr><tr><td><code>game_code</code></td><td>string</td><td>Optional</td><td>Game code (optional for live lobby)</td></tr><tr><td><code>lang</code></td><td>string</td><td>Yes</td><td>Language code (e.g. <code>en</code>)</td></tr><tr><td><code>rtp</code></td><td>number</td><td>No</td><td>Target RTP for this launch, <code>0</code> or more; a value above <code>999</code> is treated as <code>999</code>. Not used for live or sports games. If omitted or <code>0</code>, the user's configured RTP is used</td></tr><tr><td><code>lobby_url</code></td><td>string</td><td>No</td><td>URL to redirect the player when they exit the game. Omit it if there is none: an empty string is rejected</td></tr></tbody></table>

### Response

#### Success

```json
{
    "status": 1,
    "code": 7777777,
    "msg": "SUCCESS",
    "fc_code": "fc1024",
    "launch_url": "http://pragmaticplay.oaxznmnojw.net/...",
    "token": "9f2b6c1e7a4d3f8b0c5e2a1d6b7f4c3e"
}
```

#### Failure

```json
{
    "status": 0,
    "code": 7770407,
    "msg": "provider_code EVOLUTION is currently disabled"
}
```
