Create a relay session (host-client games only)
edgegap_create_relay_sessionCreates an Edgegap relay session for peer-to-peer multiplayer, registering the host's IP first, then returning the relay address and per-player tokens once ready.
Instructions
A relay is NOT a game server and is not the recommended default — for a multiplayer match, deploy an authoritative dedicated server with edgegap_deploy instead. A relay only forwards traffic between players while one player's game acts as host and owns the game state: the host can cheat and has a latency advantage, the host's PC and connection cap the match, and the match ends if the host quits. Only use this when the developer has chosen peer-to-peer/host-client, or the netcode is already a listen server and a dedicated server is not an option; if that has not been established, ask first. Never pick it only because it needs no server image. Creates an Edgegap relay session for every player's public IP, host first, waits until it is ready, and returns the relay address plus per-player authorization tokens for the relay transport. Relay sessions are billed while open: delete test sessions with edgegap_delete_relay_session when finished.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_ips | Yes | Public IP of each player, host first. Add late joiners with edgegap_authorize_relay_user. | |
| webhook_url | No | Called when the session is ready. | |
| timeout_seconds | No | Default 30. | |
| wait_until_ready | No | Poll until the relay is assigned. Default true. |