-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] How do I handle required scopes? #13
Comments
Hi! The way Twitch's EventSub system works is that authorization is handled internally and tied to a client id. So, you'll have to authorize your client to have access to that scope. If you are unfamiliar with this, you can check out the doc here. If you are using TESjs for personal use it should be as simple as using the OAuth Implicit Grant Flow. Just build yourself a URL with your client id and localhost as your redirect uri (make sure it is registered on dev.twitch.tv for your application's OAuth Redirect URLs). If you are creating a service that other people can use, you'll have to set up your authentication similarly for that as well, but with some sort of user-facing website (using whatever authorization flow makes sense for your app). Once your app has been authenticated with the correct scopes for whatever you need, it'll be good to go! Hopefully this helps! |
I am (currently) just using it for my own purposes. I followed your recommendation with the implicit flow and it worked. Thanks a lot. |
Happy to help! |
Write your question
I have set up TESjs as described in the documentation and added ClientID and Client Secret accordingly.
And it works fine for all endpoints that don't require authentication or a specific scope. But when I try to subscribe to e.g. a subscription (which requires the
channel:read:subscriptions
scope), I get the error message, that the subscription is missing proper authorization.What is the proper way to get access to those endpoints that require authorization or specific scopes?
Thanks in advance.
The text was updated successfully, but these errors were encountered: