Error Codes FAQ
Common Discord API errors and how to fix them
Missing Permissions Error 50013 HTTP 403
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.
- Go to Server Settings → Roles
- Drag the bot's role above the roles it needs to manage
- Ensure the bot role has the required permissions enabled
- 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
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.
- The mute/ban/kick still applies; only the DM failed
- To allow DMs: User Settings → Privacy & Safety → Allow direct messages from server members
- 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
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.
- Check channel permissions for the bot
- Verify the bot role is high enough in the hierarchy
- 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
The OAuth token is invalid or expired.
Solution
Re-authenticate by logging out and logging back in.
- Log out of the dashboard
- Log back in with Discord
- Try the action again
Common Causes
- Token expired
- Token was revoked
- User changed password
Invalid Webhook Token Error 50027 HTTP 403
The webhook token is invalid or the webhook was deleted.
Solution
Recreate the webhook or update the webhook URL in settings.
- Go to Server Settings → Integrations → Webhooks
- Create a new webhook or update the existing one
- Update the webhook URL in your bot settings
Common Causes
- Webhook was deleted
- Webhook token changed
- Invalid webhook URL