Chatbot IRC runs only with TMI-Generator Key

Hi,

I use a customized version of the chat bot script from Twitch Docs:

If I use the token generator linked on the page, the bot works without problems:
https://twitchapps.com/tmi/

But if I get the token with my own Auth and use it, I can’ t log in with them. I get the error “error: Login unsuccessful”.

Which auth flow are you trying to use?

If you’re using the Implicit auth flow you should get a token in the URL hash. With the Auth Code flow you get a code which you must exchange for access and refresh tokens. And the Client Credentials flow is for App tokens, which are not usable for connecting to chat with as they don’t represent a user.

I user Laravel Socialite. This usa as auth is https://id.twitch.tv/oauth2/authorize and as token url https://id.twitch.tv/oauth2/token.
I get token, refreshToken, expiresIn, id, nickname, name, email, avatar and user data.

Refreshing the token works, only the connection to the chat doesn’t.

Does the token have the appropriate scopes for the chat functionality you’re after? such as chat:read if you want to read chat.

Ahh. Thanks. I’m so stupid sometimes.

I only checkede the scopes from the first table…

No. It’s works. Thank You.

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