Developer Portal
Configure your activity in the Discord Developer Portal
The Developer Portal is where you create and configure your Discord application for activities.
Discord Developer Portal applications page showing the list of applications with the New Application button in the top right
Create an Application
- Go to discord.com/developers/applications.
- Click New Application in the top right.
- Enter a name for your application.
- Click Create.
Discord Developer Portal 'Create an Application' dialog with a text field for the application name and Create button
Enable Activities
To enable activities for your application:
- Open your application in the Developer Portal.
- Navigate to Activities in the left sidebar.
- Toggle the Enable Activities switch to on.
- This unlocks the URL Mappings section and other activity-specific settings.
Once enabled, Discord treats your application as an activity that can be launched from voice channels, text channels, and DMs.
Discord Developer Portal Activities tab showing the Enable Activities toggle in the on position, with URL Mappings section visible below
URL Mappings
Discord doesn't let activities make network requests directly. All traffic goes through Discord's proxy. URL Mappings tell Discord where to forward those requests.
The root mapping points to your app's URL: a tunnel URL during development, or your production URL when deployed.
| Prefix | Target |
|---|---|
/ (Root) | https://your-tunnel-url.trycloudflare.com |
/google-fonts | https://fonts.googleapis.com |
Additional mappings let your activity load external resources through Discord's proxy. Add entries for any third-party domains your frontend needs to access.
Discord Developer Portal URL Mappings section showing root mapping '/' pointing to a Cloudflare tunnel URL, with an additional mapping for external services
Entry Point Command
When DISCORD_TOKEN is set in your .env file, @robojs/patch automatically creates and syncs the entry point command for you during development. This is the recommended approach — no manual setup needed.
Discord requires an entry point command to launch activities. This is a special command type (type 4) that appears in the Activities shelf — it is different from regular slash commands. When a user clicks your activity in the shelf, Discord invokes this command to start the embedded session.
Without the bot token, you need to create the command manually:
- Go to your application in the Developer Portal.
- Navigate to Commands in the left sidebar.
- Click New Command and select the entry point command type.
- Set the command name (this is what users see in the Activities shelf).
- Save your changes.
Discord Developer Portal Commands tab showing the entry point command configuration with the special entry point command type selected
OAuth2 Setup
Navigate to the OAuth2 tab and add a redirect URI. Select the scopes (permission categories that control what user data your app can access) your activity requires. Common defaults are identify and guilds.
Discord Developer Portal OAuth2 tab showing Redirects section with 'https://localhost' entered and scope checkboxes with 'identify' and 'guilds' selected
Testing
After configuring URL Mappings, open Discord and join a voice channel. Click the Activities button in the voice channel controls, then select your activity from the list.
Discord desktop client in a voice channel with the activity being launched from the Activities shelf, showing the embedded panel loading
