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

# Get Game URL

> This API is used to get the game URL.

## Headers

<ParamField header="x-api-key" type="string" required>
  A unique identifier associated with operator calling API.
</ParamField>

<ParamField header="x-signature" type="string" required>
  A SHA256 HMAC signature generated using the request body and timestamp.
  Format: HMAC\_SHA256(JSON.stringify(data) + '|' + timestamp), signed using the
  provided secret key.
</ParamField>

<ParamField header="x-timestamp" type="string" required>
  An Unix timestamp (milliseconds) Used to verify the request’s freshness.
  Ensure the same value is used in signature generation.

  <Note>
    The signature will remain valid for only 5 minutes from the provided
    timestamp.
  </Note>
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Must be set to `application/json`.
</ParamField>

## Request Body

<ParamField body="gameId" type="string" required>
  A unique identifier representing the specific game being requested.
</ParamField>

<ParamField body="playerId" type="string" required>
  A unique identifier for the player initiating the game session.
  <Note>If an old playerId is sent, it must be a valid playerId and is case-sensitive.</Note>
</ParamField>

<ParamField body="playerName" type="string" required>
  The player name that is initiating the game session.
</ParamField>

<ParamField body="balance" type="integer" required>
  The player's current balance available for the game session.

  <Note>
    To maintain precision and avoid floating-point errors, the balance field is
    processed as an integer value by multiplying the actual amount by 100,000.
    For example, a balance of 12.34567 will be represented as 1234567 in the
    API.
  </Note>
</ParamField>

<ParamField body="currency" type="string" required>
  An identifier for the currency associated with the player's balance.
  See the list of supported currencies <a href=".././currency/introduction#currency-codes">here</a>.

  <Note>
    To generate a session in demo mode, you must pass the currency as "XXX" in
    the request payload. In demo mode, a session for a given player will be created only once. if the page is reloaded, a new session URL must be required again.
  </Note>
</ParamField>

<ParamField body="gamelang" type="string" required>
  Language code for the game content. Allowed values: "en", "tr".
</ParamField>

## Response

<ResponseField name="status" type="string" required>  Code indicates status of the request weather it is succeed or failed. We have listed error codes <a href="/introduction#error-codes">here</a></ResponseField>
<ResponseField name="gameUrl" type="string" required> The URL to access the game. </ResponseField>
<ResponseField name="sessionId" type="string" required> A sessionId is identifier for the game session. </ResponseField>

<ResponseExample>
  This is the expected response from a successful `Launch Game` request.

  ```json SUCCESS theme={null}
  {
    "status": "RS_OK",
    "gameUrl": "https://gamefile.elaunchinfotech.in/games/the-magician/index.html?sessionId=b932d66762ae687cdc7a90ee9f6dc22f1dc4237c963b4243691d7abb371ae801b33d59f0a04f50da256ace4f4829fde4f06d4ac9832f4bfeb1ed898a43841700ccb92d76265876bac3debe1bcfbb6a9227cfe4bc3f7602fbd10490656ac44a72f252b201a08bf1bd5f4255c79b5aaf27&mode=real&gamelang=en",
    "sessionId": "cbc4af8c23f290a3353d748644f0d81274a179782d98d372a47613c5dd562afc88312ff1631086dfeee2c3b989535f0aafa1ea38eb22b8147972e0808e001169787bb81e424bcc1b6a6dd3bce823b2213aa49b2e05be5ebad8f3db6ba8e761deb6d70cd951c622217786cd32c8093f3e90dad2892f5faba9498ee9d5330f3589dae3798345f77abd54b3d516370266519feb6bf59c03a1b45e341fdc1c6da65268aee6f7a19ab523abce020aaed4f7673fdb2540654ed360ad1f4dde1f3c83df"
  }
  ```

  ```json FAILURE theme={null}
  {
    "status": "RS_ERROR",
    "message": "Oops! Something went wrong. Please refresh the page or try again in a moment"
  }
  ```
</ResponseExample>
