0
  1. I have moderator privileges within the target channel
  2. I can get any other scope, such as moderator:manage:announcements
  3. I can get a valid bearer token with scope=moderator:read:chatters via the CLI using
    twitch token -u -s 'moderator:read:chatters', which then works fine for other encoded-URL requests that require the scope, such as Get Chatters

However, https://id.twitch.tv/oauth2/authorize?response_type=code&client_id=MY_CLIENT_ID&redirect_uri=http://localhost:3000&scope=moderator%3Aread%3Achatters does not work (I am using my actual client ID when I try it), and results in:

This site can't be reached

Is this something to do with this particular endpoint, possibly related to it being in beta, per the documentation?

Busman
  • 575
  • 2
  • 6
  • 14
  • Does localhost work? – Chetan Oct 25 '22 at 23:58
  • Every other request (using this exact url but with different scopes) works totally find with localhost. – Busman Oct 27 '22 at 01:01
  • 1
    Is `response_type=code` correct? shouldn't it be `response_type=token`? https://dev.twitch.tv/docs/irc/authenticate-bot – Chetan Oct 27 '22 at 02:12
  • Well...you helped me find the answer to my problem! The first issue was that I wasn't getting the authorization page like I was getting for any other scope...but I WAS getting the TOKEN in the URL to which I was redirected, despite the "refused to connect" error (I hadn't considered that the token/code would be in the URL). The second issue, was, as you pointed-out, it should be type=code, not type=token. Now, the URL the page lands on contains the needed bearer token. Thanks! – Busman Oct 27 '22 at 02:32

1 Answers1

0

Alright, I found the issue: nothing was wrong, the page was just behaving differently (redirecting directly to the "refused to connect" page instead of presenting the auth screen first) because I authorized that scope with the CLI already.

Busman
  • 575
  • 2
  • 6
  • 14