Dynamic Game URL
Dynamic Game URL Resolution
Overview
Groove uses a server-side redirect mechanism to dynamically resolve the actual game URL. This ensures that when you change URLs or routing logic on your side, Groove automatically picks up the new URL without requiring any manual configuration updates.
How It Works
Flow Details:
- Server-side request: Groove sends the game launch request from its server (not from the player’s browser)
- Redirect response: Your API responds with an HTTP 30X status code (e.g., 301, 302) and a
Locationheader containing the actual game URL - URL extraction: Groove captures the
Locationheader value from the redirect response - Player redirect: The resolved URL is returned to the player to launch the game
Why This Approach
This mechanism allows you to control game URL routing entirely on your side. For example:
- Market-based routing: Route players to different game servers based on region or regulation
- Infrastructure changes: Update game server URLs without notifying Groove
- A/B testing: Route different players to different game versions
- Load balancing: Distribute traffic across multiple game servers
Groove forwards the request the same way for all markets — the routing logic is entirely up to your implementation.
**Note**: This approach was initially introduced to support the Turkey market, but applies to all markets. Your API decides the redirect destination based on whatever logic you implement.
Response Requirements
Your API must return:
- Status Code:
301,302,303, or307 - Location Header: The full URL to the actual game server
Example Response
HTTP/1.1 302 Found
Location: https://games-tr.yourplatform.com/play?session=abc123&game=80102Groove does **not** automatically follow redirects. Your initial response must be the redirect itself — Groove extracts the `Location` header and uses it as the game URL for the player.