3
0 Comments

Discord's server widget endpoint is fully unauthenticated — no bot, no OAuth. I benchmarked all 3 ways to embed it.

I wanted a live Discord online-member count on a site and assumed I'd have to invite a bot. Turns out you don't: Discord exposes a public, unauthenticated endpoint at /api/guilds/{server-id}/widget.json. The server owner flips one toggle (Server Settings → Widget) and anyone can read live counts. No bot, no OAuth, no API key. Almost every tutorial I found implies otherwise.

So I benchmarked the three ways to actually put it on a page (Lighthouse mobile, fast 3G, Moto G4 emulation, against a clean 100/100/100/100 landing page):

  • Discord's native iframe — ~210 KB, +480 ms, -12 Lighthouse points. Ships its own React mini-app for the member list. Works everywhere, including Substack.
  • Roll your own — fetch widget.json server-side, cache it, render your own markup. Cheapest on the page, but you own the caching and the rate limits.
  • A one-line drop-in — 4 KB gzipped, which is what I ended up building after doing option 2 twice.

Write-up has the full comparison table plus copy-paste install steps for WordPress, Shopify, Webflow, Ghost and Substack (Substack blocks script tags, so the iframe is the only route there):
https://feed-pulse.com/blog/how-to-embed-discord-server-widget-on-website

If you've shipped this a different way — especially anyone caching widget.json at the edge — I'd like to hear how you handled stale counts. Around for the next few hours.

on September 28, 2026