Discord API · error code

Discord error 30016: Maximum number of invites reached (1000)

Permanent - do not retryHTTP 400Maximum reached (30xxx)

Last verified against Discord Developer Docs - Opcodes and status codes

What Discord returns
Maximum number of invites reached (1000)

What error 30016 means

The guild already has 1,000 active invite links and Create Channel Invite was rejected. This is the invite cap per server, not a per-channel or per-user limit. It is reached almost exclusively by bots that create a unique invite per user (referral tracking, vanity-per-member schemes, "join via bot" flows) with no expiry and no cleanup.

Invite tracking bots are the textbook case: to attribute joins, they create a fresh invite per request, set it to never expire so the attribution persists, and never delete it. A year later the server has a thousand invites and the bot breaks for everyone. Discord also periodically prunes invites that have expired, but invites with max_age: 0 never expire.

What it looks like

{
  "message": "Maximum number of invites reached (1000)",
  "code": 30016
}

Why it happens

  • One invite per user with max_age 0 and no deletion
  • Invite created on every command run instead of reused
  • Many users each creating personal invites in a large server
  • Bot recreates invites on restart because it does not persist the code

How to fix Discord error 30016

  1. 1GET /guilds/{guild.id}/invites (requires Manage Guild) to list; delete stale ones with DELETE /invites/{invite.code}
  2. 2Reuse one invite per user (store the code) rather than creating a new one each time
  3. 3Set a max_age and max_uses on invites that do not need to be permanent
  4. 4For referral attribution, compare invite uses before and after a join instead of issuing unique permanent invites

How to stop it recurring

Give invites a lifetime by default and create them lazily. Keep a table of invites your bot owns and run a daily job that deletes those past a retention window or with zero uses after a period.

Invite tracking without invite sprawl is possible: Discord reports per-invite use counts, so diffing counts across a join event attributes the join without minting a link per user. The guild invite cap is on the Discord limits page, and invite creation also requires Create Instant Invite, whose absence surfaces as 50013 rather than this code.

Official reference: Discord Developer Docs - Opcodes and status codes. See all Discord error codes or the Discord limits and quotas.

Related codes

Error 30016 - quick answers

What does Discord error 30016 mean?

The guild already has 1,000 active invite links and Create Channel Invite was rejected. This is the invite cap per server, not a per-channel or per-user limit. It is reached almost exclusively by bots that create a unique invite per user (referral tracking, vanity-per-member schemes, "join via bot" flows) with no expiry and no cleanup.

How do I fix Discord error 30016?

1. GET /guilds/{guild.id}/invites (requires Manage Guild) to list; delete stale ones with DELETE /invites/{invite.code} 2. Reuse one invite per user (store the code) rather than creating a new one each time 3. Set a max_age and max_uses on invites that do not need to be permanent 4. For referral attribution, compare invite uses before and after a join instead of issuing unique permanent invites

Should I retry after error 30016?

No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.

Stop debugging Discord by hand

Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.