shieldcn
Docs
Studio
Showcase
Sponsor
jal-co/shieldcn606
shieldcn

Member of the Vercel OSS Program

Analytics provided by OpenPanel

Monitored by Sentry

Powered by Neon.

Community

GitHubjal-co/uiStatsllms.txtPrivacyContact

Product

DocumentationAPI ReferenceToken PoolGeneratorAgent Skill

inspired by shields.io and badgen.net

Made with in by Justin Levine

shieldcn
Docs
Studio
Showcase
Sponsor
jal-co/shieldcn606

Search documentation

Search all badge providers, guides, and reference docs.

Getting Started

IntroductionREADME StudioCLIAgent SkillNewSelf-HostingAPI ReferenceToken PoolSponsor

Badges

Badge GroupStatic BadgeDynamic JSONHTTPS Endpoint
DiscordNBABlueskyX / TwitterYouTubeMastodonLemmyHacker NewsTwitchDiscourseMatrixStack Exchange

Charts

OverviewStar history

Headers

OverviewGenerator

Sponsors

OverviewGenerator

Contributors

OverviewGenerator
shieldcn

Member of the Vercel OSS Program

Analytics provided by OpenPanel

Monitored by Sentry

Powered by Neon.

Community

GitHubjal-co/uiStatsllms.txtPrivacyContact

Product

DocumentationAPI ReferenceToken PoolGeneratorAgent Skill

inspired by shields.io and badgen.net

Made with in by Justin Levine

Discord

Badges for Discord servers — online count, member count, and more.

Display live Discord server stats using the widget API or invite API.

Online count (branded)
Members (branded)
Online members
Online (outline)

Available badges

BadgeEndpointDescription
Online Count/discord/{serverId}Live online members via widget API
Members/discord/members/{inviteCode}Total member count via invite API
Online Members/discord/online-members/{inviteCode}Online members via invite API

Quick examples

![online](https://shieldcn.dev/discord/1316199667142496307.svg)
![members](https://shieldcn.dev/discord/members/reactiflux.svg)
![online members](https://shieldcn.dev/discord/online-members/reactiflux.svg?variant=branded)

Data sources

  • Widget API — Requires server widget enabled in Server Settings → Widget
  • Invite API — Uses public invite codes with with_counts=true

No API key required. Cached 1 hour.

Endpoint details

Use these sections when you need the exact URL shape or a focused example for a specific badge type.

Discord Members

This section covers the discord/members badge endpoint.

Show the approximate total member count using a public invite code.

GET/discord/members/:inviteCode.svg

Path Parameters

required

Public invite code (not the full URL).

<picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/discord/members/reactiflux.svg?mode=dark"><img alt="badge" src="https://shieldcn.dev/discord/members/reactiflux.svg?mode=light"></picture>
badge preview

URL format

/discord/members/{inviteCode}.svg

Examples

Default variant
Branded (blurple)
Secondary variant
Outline variant

Copy-paste examples

Default — total member count via invite code

<picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/discord/members/reactiflux.svg?mode=dark"><img alt="discord members" src="https://shieldcn.dev/discord/members/reactiflux.svg?mode=light"></picture>

Branded — Discord blurple background

![discord members](https://shieldcn.dev/discord/members/reactiflux.svg?variant=branded)

How to get an invite code

  1. Create or find a permanent invite link for your server
  2. The invite code is the part after discord.gg/ — e.g., reactiflux from https://discord.gg/reactiflux

Discord Online Members

This section covers the discord/online-members badge endpoint.

Show the approximate online member count using a public invite code.

GET/discord/online-members/:inviteCode.svg

Path Parameters

required

Public invite code (not the full URL).

<picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/discord/online-members/reactiflux.svg?mode=dark"><img alt="badge" src="https://shieldcn.dev/discord/online-members/reactiflux.svg?mode=light"></picture>
badge preview

URL format

/discord/online-members/{inviteCode}.svg

Examples

Default variant
Branded (blurple)
Secondary variant
Outline variant

Copy-paste examples

Default — approximate online count via invite

<picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/discord/online-members/reactiflux.svg?mode=dark"><img alt="discord online members" src="https://shieldcn.dev/discord/online-members/reactiflux.svg?mode=light"></picture>

Branded — Discord blurple background

![discord online members](https://shieldcn.dev/discord/online-members/reactiflux.svg?variant=branded)

When to use this vs widget API

MethodEndpointProsCons
Widget API/discord/{serverId}Exact countRequires widget enabled
Invite API/discord/online-members/{inviteCode}No server config neededApproximate count

Discord Online Count

This section covers the discord/online badge endpoint.

Show how many members are currently online using the Discord widget API.

GET/discord/:serverId.svg

Path Parameters

required

Server must have widget enabled in Server Settings → Widget.

<picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/discord/1316199667142496307.svg?mode=dark"><img alt="badge" src="https://shieldcn.dev/discord/1316199667142496307.svg?mode=light"></picture>
badge preview

URL format

/discord/{serverId}.svg

Examples

Default variant
Branded (blurple)
Secondary variant
Outline variant

Copy-paste examples

Branded — Discord blurple background

![discord](https://shieldcn.dev/discord/1316199667142496307.svg?variant=branded)

How to find your server ID

  1. Enable Developer Mode in Discord (User Settings → Advanced → Developer Mode)
  2. Right-click your server name and click "Copy Server ID"

Requirements

The server must have the widget enabled:

  1. Go to Server Settings → Widget
  2. Enable "Enable Server Widget"

On This Page

Available badgesQuick examplesData sourcesEndpoint detailsDiscord MembersURL formatExamplesCopy-paste examplesHow to get an invite codeDiscord Online MembersURL formatExamplesCopy-paste examplesWhen to use this vs widget APIDiscord Online CountURL formatExamplesCopy-paste examplesHow to find your server IDRequirements