Discord Developer Portal Guide: Getting Started with Discord's API
The Discord Developer Portal is where developers create bots, applications, and integrations. This guide walks beginners through the essentials.
What Is the Developer Portal?
The Developer Portal at discord.com/developers lets you:
- Create Discord applications (bots, OAuth2 apps, rich presence integrations)
- Get API credentials (Client ID, Client Secret, Bot Token)
- Configure permissions and OAuth2 settings
- View your application's stats and usage
Step 1: Create an Application
- Go to discord.com/developers/applications
- Click "New Application"
- Give it a name (this becomes your bot's name by default)
- Click "Create"
You're now in your application's dashboard.
Step 2: Set Up a Bot
- In the left sidebar, click "Bot"
- Click "Add Bot" and confirm
- Your bot is now created — it has its own token
The Bot Token is like a password for your bot. Never share it publicly. If exposed, regenerate it immediately.
Step 3: Configure Bot Settings
- Username — your bot's display name on Discord
- Icon — your bot's profile picture
- Public Bot — whether others can invite your bot to their servers
- Privileged Gateway Intents — enable these if your bot needs access to member lists, message content, or presence data
Common Intents:
- Server Members Intent — access to member join/leave events and member lists
- Message Content Intent — read message content (required for prefix-based commands)
- Presence Intent — see user presence/status
Step 4: Invite Your Bot to a Server
- Go to OAuth2 → URL Generator
- Under Scopes, check "bot" and "applications.commands"
- Under Bot Permissions, select the permissions your bot needs
- Copy the generated URL and open it in your browser
- Choose a server and click Authorize
Step 5: Build Your Bot
With your bot token, use a Discord library to write your bot:
| Language | Library | |---|---| | JavaScript | discord.js | | Python | discord.py or Pycord | | Java | JDA | | Go | discordgo | | Rust | Serenity |
Key API Concepts
- Gateway — WebSocket connection for real-time events (messages, member joins)
- REST API — HTTP endpoints for actions (send message, ban user)
- Webhooks — One-way message senders without a full bot
- Slash Commands — Registered commands that appear in the
/menu - Interactions — Buttons, dropdowns, and modals in messages
Rate Limits
Discord's API has rate limits to prevent abuse. Your library handles most of these automatically, but be aware:
- Global rate limit: 50 requests/second
- Per-route limits vary
Resources
- Official docs: discord.com/developers/docs
- Explore bot-powered communities on Discords.ai for inspiration