discordgo icon indicating copy to clipboard operation
discordgo copied to clipboard

error opening connection, websocket: close 4004: Authentication failed.

Open fgsoftware1 opened this issue 1 year ago • 3 comments

received this error on ping-pong example passing token param

fgsoftware1 avatar Oct 06 '22 10:10 fgsoftware1

Please verify that the token is valid or just regenerate it in developer dashboard. Additionally how are you supplying it?

FedorLap2006 avatar Oct 06 '22 11:10 FedorLap2006

Please verify that the token is valid or just regenerate it in developer dashboard. Additionally how are you supplying it?

  1. i had renegerated and doesn't work either
  2. as said on readme(-t token)

fgsoftware1 avatar Oct 06 '22 11:10 fgsoftware1

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

Run curl https://discordapp.com/api/v7/gateway/bot -H "Authorization: Bot <token> to validate your token is valid

kolvin avatar Oct 11 '22 00:10 kolvin