I have not been able to login to the irc servers using either of my 2 accounts. I can’t connect either via my custom program or via some standard client like mirc. I have spent 2 hours reading bunches of posts and sample code on this site while trying code adjustments but I don’t see an explanation for what I’m seeing.
To start at the beginning, I found a very basic example of a bot/script online which connects to irc and reads the chat for a room. Then I read over this page https://github.com/justintv/Twitch-API/blob/master/IRC.md which is supposed to tell me how to connect to IRC. I am following that page as best I can, which required some small modifications to this program, but no matter what I get this response:
:tmi.twitch.tv NOTICE * :Error logging in
To clarify, I am able to connect to the server, but when I send my credentials I get the above response. Interestingly, if I use the anonymous login technique (justinfan######), the script is able to connect. I tried using mirc to log in with my accounts, which failed, but i haven’t used that program in several years so I am probably doing it wrong.
I tried running the script with my original account, passing the same username and stream key that i use during broadcasting, and then later tried with a new account that I recently created but haven’t done much on. I did go to the page that generates the auth key for this newer account which I thought was supposed to somehow enable the account for joining irc chat. I am a bit confused on whether this chat key overrides my stream key or is a separate key used only for joining chats. Regardless, that’s they key i am using and I am sending the credentails over using this python code:
s.send('PASS %s\r\n' % key)
s.send('NICK %s\r\n' % user)
s.send('USER %s\r\n' % user)
where key starts with “oauth:” and my username is all lowercase. I saw a lot of people talking about a twitch api and registering apps and authenticating users, but I think that was for twitch channel owners trying to authenticate their fans and couldn’t follow it. I don’t think I need api access here – I am just trying to connect to IRC for now which I have the impression is possible to do without connecting to the API. I ensured the 6667 port is open/forwarded in my router, and must be using the correct server since I can login with the anonymous credential and get the nice message about twisty passages.
I also tried some of the other ports people mentioned like 6697, 80, and 443, but had no luck and it looks like they require a different setup/code anyway. I don’t know how to verify whether my auth token has chat_login permissions but I would hope so since I just clicked on a page’s provided link of something like ‘go here to get your auth token for connecting to irc chat’.
Please let me know what could be wrong with my account or login procedure. I will be happy to provide code if my issue isn’t already clear to someone.