Discord REST API
Number of APIs: 178
[]
Getting Started with Discord APIs
This Qodex collection contains APIs that can be used to build Discord apps to customize your server. This includes a brief intro on setting up an app, but the full documentation is on the Discord Developer Portal.
Step 1: Creating an app
To use the Discord APIs, you'll need an app installed on your Discord server with any permissions it needs to function.
If you don't have an app, you can navigate to the developer dashboard and click New Application. Follow the app creation flow, and then you'll land on your app's settings.
Step 2: Adding a bot
On the left hand sidebar click Bot.
Once you create a bot, you’ll have an option to update its icon and username. Under that, there’s a Token section with a Reset Token button. Bot tokens are highly sensitive, so you should never share them.
Go ahead and click Reset Token. Store the token somewhere safe (like in a password manager). This token will be what you can authorize the Rest API requests in the Qodex collection with.
Step 3: Adding permissions
Different API endpoints require different permissions, so you should make sure your app has any permissions associated with the endpoints you want to call.
Before installing your app, it'll need permissions to perform actions in the workspace it's being installed to. Click on OAuth2 in the left sidebar, then URL generator.
The bot
scope is required to enable your bot user, so you should go ahead and click that. After you click bot, you can add different permissions to the bot.
Permissions required for an endpoint can be found in the docs. For example, sending a message requires the SEND_MESSAGE
permission as per the Create Message docs.
Step 4: Installing your app
Copy the URL from above, and paste it into your browser. You’ll be guided through the installation flow, where you should make sure you’re installing the app on a server where you can develop and test.
After installing your app, you can head over to your server and see that it has joined ✨
With your app configured and installed, you can start calling API endpoints in Qodex!
[]
-
Audit Log - list guild audit log entries GET {{baseUrl}}/guilds/:guild_id/audit-logs?user_id=<string,null>&action_type=<integer,null>&before=<string,null>&after=<string,null>&limit=<integer,null>
-
Channels - create guild channel POST {{baseUrl}}/guilds/:guild_id/channels
-
Guilds - delete guild DELETE {{baseUrl}}/guilds/:guild_id
-
Channels - bulk update guild channels PATCH {{baseUrl}}/guilds/:guild_id/channels
-
Channels - get channel GET {{baseUrl}}/channels/:channel_id
-
Channels - update channel PATCH {{baseUrl}}/channels/:channel_id
-
Applications - get my application GET {{baseUrl}}/applications/@me
-
Applications - update my application PATCH {{baseUrl}}/applications/@me
-
Applications - get application GET {{baseUrl}}/applications/:application_id
-
Applications - update application PATCH {{baseUrl}}/applications/:application_id