Error Codes FAQ

Common Discord API errors and how to fix them

Missing Permissions Error 50013 HTTP 403

Permissions

The bot doesn't have sufficient permissions to perform this action.

Solution

Move the 'Scrapline' role (or your allocated bot role) above the target role in Discord's role hierarchy. The bot role must be higher than any role it needs to manage.

  1. Go to Server Settings → Roles
  2. Drag the bot's role above the roles it needs to manage
  3. Ensure the bot role has the required permissions enabled
  4. Check channel-specific permission overrides

Common Causes

  • Bot role is below the role it's trying to manage
  • Bot doesn't have the required permission enabled in server settings
  • Channel-specific permissions are blocking the bot

Cannot Send Messages to This User Error 50007 HTTP 403

Permissions

The bot cannot send a direct message (DM) to this user. Common when the user has DMs disabled or has blocked the bot.

Solution

The moderation action may still have been applied (for example, a mute). The user will not receive a DM. Ask them to enable DMs from server members or to unblock the bot if they want to receive notifications.

  1. The mute/ban/kick still applies; only the DM failed
  2. To allow DMs: User Settings → Privacy & Safety → Allow direct messages from server members
  3. User can unblock the bot if they previously blocked it

Common Causes

  • User has DMs disabled for this server
  • User has blocked the bot
  • User has disabled DMs from everyone

Missing Access Error 50001 HTTP 403

Permissions

The bot doesn't have access to the resource (channel, role, etc.).

Solution

Ensure the bot has access to the channel or role. Check channel permissions and role hierarchy.

  1. Check channel permissions for the bot
  2. Verify the bot role is high enough in the hierarchy
  3. Add the bot to private channels if needed

Common Causes

  • Channel is private and bot isn't added
  • Role is above the bot's role
  • Channel permissions deny access

Invalid OAuth2 Access Token Error 50025 HTTP 403

Permissions

The OAuth token is invalid or expired.

Solution

Re-authenticate by logging out and logging back in.

  1. Log out of the dashboard
  2. Log back in with Discord
  3. Try the action again

Common Causes

  • Token expired
  • Token was revoked
  • User changed password

Invalid Webhook Token Error 50027 HTTP 403

Permissions

The webhook token is invalid or the webhook was deleted.

Solution

Recreate the webhook or update the webhook URL in settings.

  1. Go to Server Settings → Integrations → Webhooks
  2. Create a new webhook or update the existing one
  3. Update the webhook URL in your bot settings

Common Causes

  • Webhook was deleted
  • Webhook token changed
  • Invalid webhook URL