Discord API v9 Deprecated: How to Migrate to v10 in 2026
Discord API v9 is deprecated. API v10 is the current stable version. If your bot still targets v9, migrate now before Discord removes v9 endpoints.
What Changed in API v10
Base URL: https://discord.com/api/v10/ (was /api/v9/)
Intents are mandatory. In v9 you could connect without specifying intents. In v10, you must explicitly declare intents in the identify payload. Omitting them causes a disconnect.
Message Content intent is privileged. To read message content in guild channels, your bot needs the Message Content privileged intent enabled in the Developer Portal.
Removed endpoints: Several deprecated v9 endpoints no longer exist. Audit log fields changed names. Template and sticker endpoints were restructured.
How to Migrate
Step 1: Update your library
discord.js: Run npm install discord.js@latest to get v14+, which targets API v10 by default.
discord.py: Run pip install -U discord.py to get v2.4+, which targets v10.
Pycord: Run pip install -U py-cord.
Step 2: Declare intents explicitly
discord.js v14:
const { Client, GatewayIntentBits } = require("discord.js");
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent, // privileged
]
});
discord.py v2:
import discord
intents = discord.Intents.default()
intents.message_content = True # privileged
client = discord.Client(intents=intents)
Step 3: Enable privileged intents in Developer Portal
Go to discord.com/developers/applications. Select your bot. Under "Bot", enable:
- Presence Intent (if you read user presence)
- Server Members Intent (if you fetch member lists)
- Message Content Intent (if you read message text in guilds)
For bots in 76+ servers these require approval. For 100+ servers, you need to apply.
Step 4: Test
Run your bot in a test server. Verify commands work, events fire correctly, and message content is accessible if you enabled that intent.
Common Migration Errors
"Disallowed intents" error: You declared an intent your bot is not approved for. Remove it or apply in the Developer Portal.
Empty message.content: Missing the Message Content privileged intent. Messages arrive but content is an empty string.
"Missing access" on slash commands: Your bot needs the applications.commands scope. Re-invite with the updated OAuth2 URL.
Hosting Your Updated Bot
After migrating, deploy on a reliable host. Space-Node VPS plans start at 3.50 EUR/month with root access and 99.9% uptime. Run your bot with PM2 for automatic restarts.
