Closed happsie closed 7 months ago
The error with the string "reconnect" is an internal error that should never be returned to you as a user
See https://github.com/gempir/go-twitch-irc/blob/master/client.go#L717-L727 where errReconnect
should be caught and not returned
Your code looks good, that's basically what the readme & the cmd/pingpong/pingpong.go
example looks like
Common disconnects happen due to bad tokens, could you try connecting anonymously for now? basically
ti.client = twitch.NewClient("justinfan123456", "oauth:123123123")
Thanks for your reply!
Seems like anonymous client works fine. What format should the token be in? I currently have it as oauth:bearer token
. Having it as oauth:token
gives login authentication failed
It must be oauth:abc123
where abc123
is your User Access Token that has chat reading (and optionally writing) permissions
The flow I use for my bots is: Use an Authorization code grant flow, sign into my website with the bot account. That forwards my browser to web server/bot service, it then uses the authorization code to get a User Access Token (access_token
in the response), and a Refresh Code (refresh_code
in the response).
The User Access Token is used to connect to chat, and the Refresh Code is used to refresh the User Access Token when it has expired.
Thank you!
Was a permissions problem, did not think of adding them as scopes :D
Hello!
Not sure if I'm not understanding at all, but this is my code I am trying to use to connect to twitch IRC using this library.
After some debugging, I see that I constantly hit the error
reconnect
. I am however not sure why and don't see any errors. Is there something I'm missing?