Discord API · error code

Discord error 520002: Invalid channel type for poll creation

Permanent - do not retryHTTP 400Validation and request shape

Last verified against Discord Developer Docs - Opcodes and status codes

What Discord returns
Invalid channel type for poll creation

What error 520002 means

You tried to send a poll into a channel type that does not support polls. Polls are sent as a poll object on a normal message create, and Discord only accepts them in certain channel types.

Bots usually hit this by sending a poll to a channel stored in config without checking its type: for example a forum or media channel, or a channel that changed type after setup. The poll payload itself may be valid.

A missing Send Polls permission is a permission failure rather than this code. If 520002 persists, check which channel ID is in the request and what type it is.

Polls also need the Send Polls permission in the destination. Make sure you are testing the channel type separately from permissions when you debug, since the two failures look similar from the bot's side.

What it looks like

{
  "message": "Invalid channel type for poll creation",
  "code": 520002
}

Why it happens

  • Poll sent to a forum or media channel instead of a post inside it
  • Destination channel stored in config is of an unsupported type
  • Channel converted to a different type after the bot was configured
  • Poll sent to a channel ID that belongs to a category

How to fix Discord error 520002

  1. 1Fetch the destination channel and check its type
  2. 2Send the poll to a regular text channel or to a thread
  3. 3For forums, create the post first and send the poll inside the thread
  4. 4Retry and confirm the poll renders
  5. 5Check the bot has Send Polls in the destination as well

How to stop it recurring

Restrict channel pickers for poll features to supported types using channel_types on slash command options. Re-check the channel type when CHANNEL_UPDATE arrives. Forum posting rules are on 40058. Validate the destination channel once, when the feature is first configured.

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

Related codes

Error 520002 - quick answers

What does Discord error 520002 mean?

You tried to send a poll into a channel type that does not support polls. Polls are sent as a poll object on a normal message create, and Discord only accepts them in certain channel types. Bots usually hit this by sending a poll to a channel stored in config without checking its type: for example a forum or media channel, or a channel that changed type after setup. The poll payload itself may be valid.

How do I fix Discord error 520002?

1. Fetch the destination channel and check its type 2. Send the poll to a regular text channel or to a thread 3. For forums, create the post first and send the poll inside the thread 4. Retry and confirm the poll renders 5. Check the bot has Send Polls in the destination as well

Should I retry after error 520002?

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.