Configure URL Mappings and proxy patching so a Discord Activity's network calls work inside the sandboxed iframe

domain: discord.com/developers · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. In the Discord Developer Portal, open your app's Activities settings and add URL Mappings that route requests from https://<client_id>.discordsays.com/<path> to your backend's target domain.
  2. Register your Activity's root mapping ("/") to your app's frontend host so the iframe loads correctly when launched from a voice channel or DM.
  3. For third-party or external URLs your frontend code calls directly (analytics, CDNs, APIs) that aren't covered by static mappings, use the Embedded App SDK's patchUrlMappings to rewrite fetch, WebSocket, and XMLHttpRequest calls at runtime.
  4. Test locally with a tunnel mapped to the same URL Mapping pattern, since the Discord proxy intercepts all network traffic even in development.
  5. Expect requests to unmapped external domains to fail with a blocked network error, since the Discord proxy blocks anything not explicitly mapped.

Known gotchas

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans