Discord Activity Troubleshooting Guide
Error: 403 Forbidden on Directory API + X-Frame-Options Error
Symptoms
Root Causes
Solution: Step-by-Step Configuration
Step 1: Enable Activities Feature
Step 2: Configure Activity URL
Step 3: Verify Interactions Endpoint
Step 4: Check OAuth2 Settings
Step 5: Test the Activity
Debugging Checklist
Server-Side Checks
1. Verify Interactions Endpoint is Responding
2. Check DISCORD_PUBLIC_KEY is Set
3. Check X-Frame-Options Headers
Client-Side Checks
1. Open Browser Console (F12)
2. Check frame_id Parameter
3. Check Discord SDK Loading
Common Issues & Solutions
Issue 1: "Not in Discord Activity context (no frame_id)"
Issue 2: "Failed to initialize Discord Activity"
Issue 3: "X-Frame-Options: sameorigin" Error
Issue 4: 403 Forbidden on Directory API
Testing Activity in Development
Using Discord's Embedded Test
Using a Test Server
Environment Variables to Verify
Still Not Working?
Discord Developer Portal Checklist
Last updated
