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

# FAQ

> Frequently asked questions about PlayWave Roblox integration

## Setup

<AccordionGroup>
  <Accordion title="&#x22;HttpService is not allowed to send requests&#x22; error">
    Enable **Allow HTTP Requests** in Roblox Studio → Game Settings → Security.
  </Accordion>

  <Accordion title="Where do I get an API Key?">
    API Keys are issued per game from the PlayWave admin console. Contact your PlayWave operations representative to request one.
  </Accordion>

  <Accordion title="Are the test and production API URLs different?">
    | Environment | URL                                   | Status      |
    | ----------- | ------------------------------------- | ----------- |
    | **Dev**     | `https://wave-api.playwave.dev/v1`    | Available   |
    | **QA**      | `https://wave-api-qa.playwave.dev/v1` | Coming soon |
    | **Live**    | `https://wave-api.playwave.io/v1`     | Coming soon |

    API Keys are issued separately for each environment.
  </Accordion>
</AccordionGroup>

## Sessions

<AccordionGroup>
  <Accordion title="What happens to users who connect without the PlayWave launcher?">
    `LaunchData` will be empty, so OTT extraction returns `nil`. This is normal behavior — simply don't grant PC cafe benefits to these users. Normal gameplay is unaffected.
  </Accordion>

  <Accordion title="I keep getting OTT_EXPIRED errors">
    OTT must be verified within **1 minute** of issuance. If your game has long loading times, make sure you're calling verify immediately in the `PlayerAdded` event.
  </Accordion>

  <Accordion title="What happens if I don't send heartbeats?">
    The game session's Redis TTL is **4 minutes**. Without heartbeats, the session is automatically deleted after 4 minutes and billing is abnormally terminated. Always send heartbeats at 2-minute intervals.
  </Accordion>

  <Accordion title="Should I keep sending heartbeats after CHARGE_EXHAUSTED?">
    Yes. The server has a 2-minute grace period before auto-termination. Continue sending heartbeats during the grace period to keep the session properly maintained. Notify the user about G-coin depletion, but don't kick them immediately.
  </Accordion>

  <Accordion title="Can is_pc_cafe be false after a successful verify?">
    Currently, PlayWave is a PC cafe-only platform, so `is_pc_cafe` is always `true` on successful verification. However, we recommend checking the flag in your code for future extensibility.
  </Accordion>

  <Accordion title="What happens to sessions when the server restarts?">
    On Roblox server restart, `game:BindToClose` calls the end session API for all active sessions. Even if the calls fail, sessions are automatically cleaned up via TTL expiration after 4 minutes.
  </Accordion>
</AccordionGroup>

## Teleport

<AccordionGroup>
  <Accordion title="PC cafe benefits are lost after teleporting to a SubPlace">
    You must include PlayWave session data in `TeleportOptions` when teleporting. Call `PlayWaveServer.prepareForTeleport(player, teleportOptions)` before `TeleportAsync`. See the [Teleport integration guide](/roblox/teleport) for details.
  </Accordion>

  <Accordion title="Do I need to install the SDK on every SubPlace?">
    Yes. PlayWave SDK must be installed on every SubPlace that is a teleport destination so it can receive session data and maintain authentication.
  </Accordion>

  <Accordion title="My callback code disappeared after updating the plugin">
    Clicking **Install SDK** resets the `PlayWaveSetup` and `PlayWaveClient` scripts. Always back up your existing callback code before reinstalling the SDK, then restore it afterward.
  </Accordion>

  <Accordion title="What happens if I don't implement teleport integration?">
    Sessions will not persist after teleporting to a SubPlace, so billing will not apply. This can result in revenue loss.
  </Accordion>
</AccordionGroup>

## Roblox-specific

<AccordionGroup>
  <Accordion title="Is there a LaunchData length limit?">
    OTTs are in UUID format (36 characters), well within any length limits.
  </Accordion>

  <Accordion title="Does the HTTP call in PlayerRemoving complete reliably?">
    When an individual player leaves, the server is still alive so HTTP calls complete normally. For the case when the last player leaves and the server shuts down, use `game:BindToClose`. `BindToClose` has a 30-second time limit — HTTP calls must complete within that window.
  </Accordion>

  <Accordion title="Is the task.spawn heartbeat loop stable for long sessions?">
    The `task.spawn` + `task.wait` loop pattern is stable for long-running sessions in Roblox. The loop continues while the player is in-game and automatically terminates when the session is removed from the `activeSessions` table.
  </Accordion>

  <Accordion title="Do I need to whitelist external domains for HttpService?">
    Enabling **Allow HTTP Requests** in Game Settings → Security is sufficient. No separate domain whitelist is needed.
  </Accordion>
</AccordionGroup>
