discordgo
discordgo copied to clipboard
error opening connection, websocket: close 4004: Authentication failed.
received this error on ping-pong example passing token param
Please verify that the token is valid or just regenerate it in developer dashboard. Additionally how are you supplying it?
Please verify that the token is valid or just regenerate it in developer dashboard. Additionally how are you supplying it?
- i had renegerated and doesn't work either
- as said on readme(-t token)
Hit the same problem until I realized I was grabbing the wrong value from the discord portal
Make sure you're getting your token from the bot
tab and not the OAuth
Tab like I was
![image](https://user-images.githubusercontent.com/15124052/194969609-9764ede0-9f73-4abe-90b2-207c52ca783e.png)
Run curl https://discordapp.com/api/v7/gateway/bot -H "Authorization: Bot <token>
to validate your token is valid