Discord · 50001

Discord error 50001: Missing Access

Discord will not let your bot near the channel or server it asked about. Unlike Missing Permissions, this is about being able to see the thing at all.

← All errors

What you are seeing

discord.js

DiscordAPIError[50001]: Missing Access

discord.py

discord.errors.Forbidden: 403 Forbidden (error code: 50001): Missing Access

What causes it

The bot cannot view the channel. Without View Channel — granted server-wide or in that channel's own permissions — the channel does not exist as far as the bot is concerned, and sending, reading or fetching anything in it fails with 50001. Private channels and categories are the usual culprits. For voice channels, Connect is needed as well.

The bot is not in the server. Fetching a server, channel or member by ID after the bot has been removed from that server gives Missing Access, as does a hard-coded channel ID copied from a different server.

The invite left out slash commands. Registering commands in a specific server fails with 50001 if the bot was added without the applications.commands scope. Re-invite it with a link that includes both scopes; there is no need to remove it first.

It is a private thread the bot has not joined. The bot needs to be added to the thread, or to have Manage Threads, before it can post in it.

Finding which one

Log the channel or server ID alongside the error, then look at that exact channel's permissions with Discord's "View server as role" feature on the bot's role. If the channel vanishes from the list, it is a visibility problem.

discord.js

const { PermissionFlagsBits } = require('discord.js');

const channel = await client.channels.fetch(channelId).catch(() => null);
const canSee = channel?.permissionsFor(client.user)?.has(PermissionFlagsBits.ViewChannel);

if (!canSee) console.warn(`Cannot see channel ${channelId}`);

FAQ

Questions

It worked yesterday and fails today.

Somebody changed the channel's permissions or moved it into a private category, which takes its permissions from the category. Check the channel's permission overrides first.

Do I need to kick the bot to fix the scopes?

No. Open an invite link with the bot and applications.commands scopes and authorise it for the same server. The bot stays in, and gains the scope.