Can not login to chat with oauth from my own app, but can via twitchapps key

I am having a a problem with using my a twitch app I created to create an oauth token.

Following the guidelines of the API, I created an app in my twitch account settings and got a client_id.

I then spin up a simple webserver, and show a WebBrowser form.

In the browser, I redirect the user to the authentication gateway and request the “chat_login” scope. I have the redirect set to http://localhost:8080/auth/ which works perfectly.

I grab the token from the redirect, then again following the guide I connect to the IRC, and send “PASS oauth:code” and then “NICK username”.

After that, I receive an error of “Authentication Incorrect”.

Now, the very weird thing is, if I use and copy that oauth token into my app, I am able to login perfectly.

Why would a token from my “app” not work, but the token from would work? I even tried adding more scopes to the request, but it still will not log me in.

To ensure that I am not accidentally trimming the token, I ran through the whole process manually in the browser, and even then the token still does not work.

Am I missing something obvious?

Relevant Code:

I also have tried to connect via SSL, but that did not help :frowning:

Have you checked the to make sure the scope is correctly applied to the token?


Okay, I looked in there and I am getting


Now to start digging on that! I feel like I am doing everything properly though :frowning:

oh my code, I think I figured it out! I need to use response=token instead of respose=code…

Refactoring my code now.

I solved the issue! I was not using the implicit reply. It’s all set now!

Thanks for the help @matt_thomas!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.