Muetze
November 17, 2020, 10:50am
1
Hi,
I use a customized version of the chat bot script from Twitch Docs:
Twitch Chat & Chatbots
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”.
Dist
November 17, 2020, 11:02am
2
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.
Muetze
November 17, 2020, 11:32am
3
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.
Dist
November 17, 2020, 11:36am
4
Does the token have the appropriate scopes for the chat functionality you’re after? such as chat:read
if you want to read chat.
Muetze
November 17, 2020, 11:41am
5
Ahh. Thanks. I’m so stupid sometimes.
I only checkede the scopes from the first table…
Authentication
No. It’s works. Thank You.
system
Closed
December 17, 2020, 11:41am
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.