Access Token query

oAuth: Getting OAuth Access Tokens | Twitch Developers

Uou can if you call the “Get users” endpoint with a user token that has the user:read:email scope (do not specify a user id or login)

When you call Get User

  • with a token
  • without a id in the params
  • without a login in the params

Then the Get Users API returns a object representing the user that the token belongs to

Docs: Reference | Twitch Developers
Implict auth example demonstrating that: Twitch Implicit Auth Example

But userID from the Get Users endpoint (getting a userID for a token as noted above) should be sufficent, rather than via email address. So in theory you do not need to do it via email address. Additionally you might find that streamers use a different email address for their account than you use to match them if you are using their “public conatct meail”. So userID matching via userID from validate or get users will suffice.

Alternatively the userID is returned from the validate endpoint when calling with a user token you got from an oAuth login flow Authentication | Twitch Developers