6.2 KiB
Discord Activity Errors - Diagnostic & Fix Guide
Problem
When opening Discord Activity, getting these errors:
GET https://discord.com/api/v9/application-directory-static/applications/578971245454950421?locale=en-US 403 (Forbidden)
Refused to display 'https://578971245454950421.discordsays.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'
Root Cause
The Discord app is NOT properly configured for Activities in the Discord Developer Portal.
Solution Checklist
Step 1: Go to Discord Developer Portal
- Visit: https://discord.com/developers/applications
- Click on "AeThex" application
- Go to the "Activities" tab on the left sidebar (NOT "General Information")
Step 2: Enable Activities
- If you don't see an "Activities" tab, the feature isn't enabled yet
- Click "Enable Activities" or "Configure"
- Fill in the required fields:
Activity Settings:
- Activity Name:
AeThex - Preview Image: Upload a 512x512px image (your app logo)
- Description:
AeThex Creator Network & Talent Platform - Activity - Privacy Policy URL:
https://aethex.dev/privacy - Terms of Service URL:
https://aethex.dev/terms
Activity Instance Settings:
- Instance URL:
https://aethex.dev/activity - Enable this URL: ✅ Check this box
Step 3: Verify Manifest Configuration
The app must have a properly configured manifest. Check:
- Manifest file exists at:
https://aethex.dev/discord-manifest.json - Manifest contains:
{
"id": "578971245454950421",
"version": "1",
"name": "AeThex",
"description": "AeThex Creator Network & Talent Platform - Activity",
"rpc_origins": ["https://aethex.dev", "https://discord.com"],
"interactions": {
"request_url": "https://aethex.dev/api/discord/interactions"
},
"instanceUrl": "https://aethex.dev/activity",
"orientation": "portrait-primary"
}
- To verify, open in browser: https://aethex.dev/discord-manifest.json
- Should return valid JSON, not 404
Step 4: Set Interactions Endpoint
Still in Discord Developer Portal:
- Go to "General Information" tab
- Under "Interactions Endpoint URL":
https://aethex.dev/api/discord/interactions - Click "Save" (Discord will send PING to verify)
- You should see:
✅ Interactions endpoint URL verified
Step 5: Check Bot Permissions
-
Go to "OAuth2" > "URL Generator"
-
Select these scopes:
- ✅
applications.commands - ✅
identify - ✅
email - ✅
guilds
- ✅
-
Select these permissions:
- ✅
Send Messages - ✅
Read Messages/View Channels - ✅
Use Application Commands
- ✅
-
Copy the generated URL and authorize the bot in your Discord server
Step 6: Verify Bot Token
In Discord Developer Portal:
- Go to "Bot" tab
- Under "TOKEN", verify the token is:
- ✅ Not expired (if it shows "TOKEN EXPIRED", click "Reset Token")
- ✅ Correctly set in your deployment environment variables
- ✅ Has these intents enabled:
- ✅ Server Members Intent
- ✅ Message Content Intent
- ✅ Guild Members
Step 7: Test the Activity
- Open Discord
- Go to any server where the bot is installed
- Look for "Apps" section in the bottom left
- Click to browse available activities
- Find "AeThex" and click to open
- Should load without 403 errors
If Still Getting Errors
403 Still Appears
- Cause: Activities might still not be fully enabled
- Fix: Wait 5-10 minutes for Discord to propagate settings, then retry
- Alternative: Try using a different Discord server to test
X-Frame-Options Error Persists
- Cause: Discord's internal sandbox is rejecting the Activity
- Fix: Verify
instanceUrlin Developer Portal matches exactly:https://aethex.dev/activity - Check: Make sure Activity URL returns valid HTML, not redirects
Activity Blank/Loading Forever
- Cause:
/api/discord/activity-authendpoint might be failing - Debug:
- Open browser console (F12)
- Look for messages starting with
[Discord Activity] - Check if auth endpoint is being called
- Verify DISCORD_CLIENT_ID is set in environment
Slash Commands Not Working in Activity
- Cause: Interactions endpoint not verified
- Fix: Ensure
https://aethex.dev/api/discord/interactionsis set and verified in Discord Developer Portal
Environment Variables Needed
Verify these are set in your deployment (Vercel/Railway/etc):
VITE_DISCORD_CLIENT_ID=578971245454950421
DISCORD_BOT_TOKEN=<your_bot_token>
DISCORD_PUBLIC_KEY=<your_public_key>
Browser Console Debug Output
Open browser console (F12) and look for these messages:
✅ Success indicators:
[Discord Activity] Initialization starting...
[Discord Activity] Creating SDK with clientId: 578971245454950421
[Discord Activity] SDK is ready
[Discord Activity] Session authenticated
[Discord Activity] User authenticated successfully
❌ Error indicators:
[Discord Activity] Authorizing user...
[Discord Activity] Got access token, calling activity-auth...
ERROR: 403 Forbidden
Quick Verification Steps
-
Check manifest is accessible:
curl https://aethex.dev/discord-manifest.jsonShould return valid JSON
-
Check interactions endpoint:
curl -X POST https://aethex.dev/api/discord/interactions \ -H "Content-Type: application/json" \ -d '{"type":1}'Should return a response (not 404/500)
-
Check bot token:
curl -H "Authorization: Bot YOUR_TOKEN" \ https://discord.com/api/v10/users/@meShould return bot user info
Still Need Help?
- Check Discord Activities documentation: https://discord.com/developers/docs/activities/building-an-activity
- Review the bot logs: Check what
[Discord Activity]messages appear in browser console - Verify manifest at: https://aethex.dev/discord-manifest.json
- Test interactions endpoint manually with curl/Postman
References
- Discord Activities Guide: https://discord.com/developers/docs/activities/building-an-activity
- Manifest Format: https://discord.com/developers/docs/activities/manifest
- Interactions: https://discord.com/developers/docs/interactions/receiving-and-responding