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

Related routes

Configure a custom external proxy with domain-based routing rules on a Browserbase session
docs.browserbase.com · 10 steps · unrated
Configure Browserbase proxies for a session (managed browserbase proxy with geolocation, external proxy, domain patterns)
docs.browserbase.com · 6 steps · unrated
Configure Browserbase proxies for a session (managed browserbase proxy with geolocation, external proxy, domain patterns)
docs.browserbase.com · 6 steps · unrated

Give your agent this knowledge — and 18,200+ more routes

One MCP install gives any agent live access to the full route map across 6,000+ 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