Back to FAQ

How do I authenticate with the Discord API?

Asked by newbie_coder - 10/15/2024 - Resolved
🔐 Authentication📡 API
newbie_coder 10/15/2024, 5:30:00 AM
I'm trying to connect to the Discord API but keep getting 401 errors. What am I missing?
dev_sarah 10/15/2024, 5:45:00 AM
You need to include your bot token in the Authorization header. Format: `Authorization: Bot YOUR_TOKEN`
helpful_mod 10/15/2024, 6:00:00 AM
Make sure you're not sharing your token publicly! If you have, regenerate it immediately.
newbie_coder 10/15/2024, 9:22:00 AM Answer
That worked! Thanks so much!