So I read the documentation on github, and they say that we need to get a Twitch Chat OAuth Password Token. So I click to the link and generate a password token. Then I add it to the function ComfyJS.Init([channel-name], [oauth-password]).
And then, I add the code to send a message just to see if everything works properly, like so : ComfyJS.Say( "test" );.
But, when I look at my console, I have an error which says : Invalid Password or Permission Scopes (channel:read:redemptions, user:read:email).
And I can’t send message to my chat.
Is there anything that I have missed to make it work ? How can I fix this issue ?
The problem is, I have generated the token at least 3 time, but I still have the same error and I don’t know why… I’m wondering if there is anything else to do. Or maybe I have created something, like my own app, and nothing works.
I can’t use dotenv like the editor said, but instead I put the auth code directly into the function, like so : ComfyJS.Init( "DuckenScott", 'oauth:wrk4x945pz0wfo4xjzb73xxxxxxxxx' );
I think I did nothing wrong, that’s why I’m a little bit lost, the documentation is simple but it doesn’t work…
Use validate to ensure that your token has what you think it has in terms of scopes
Beyond that I’m not sure how else to help you as this could be a library problem, or a problem with the instructions for that library, and I don’t use comfy.js
And your error says you don’t have enough scopes, or you only have these scopes? I don’t know without digging thru comfy’s code to see what this error actually means.
Okay so I use de command : curl -H "Authorization: OAuth wrk4x945pz0wfo4xjzb73xxxxxxxxx" https://id.twitch.tv/oauth2/validate
into my CLI, and I have an error which say:
`Invoke-WebRequest: Unable to bind parameter "Headers". Unable to convert value "Authorization: OAuth wrk4x945pz0wfo4xjzb73xxmp34dfe" from type "System.String" to type "System.Collections.IDictionary".`
Is there anything wrong that I did ?
I didn’t done that, I only use the Comfy.Say function.
I didn’t set any scope. I only download the zip and add the comfy.min.js into my project, I didn’t set anything.
No into Visual Studio Code. Do I have to use something else ?
So the chat capable token generate channel:read:redemptions && user:read:email, is it correct ? Or do I have to generate a token with twitchapps.com/tokengen ?
I only generate a token in this url twitchapps.com/tmi and I enter the entire code into the function ComfyJS.Init() like the documentation says.
Okay so I delete an application that I have been set in my twitch dev dashboard and regenerate a new token, and now it works ! Thanks again for your awesome help ! Thank you so much !