401: Missing User OAUTH Token

I tried to get API responses with POSTMAN, but it did not work.
It gets channel informations only.

to get tokens

method: post
url: https://id.twitch.tv/oauth2/token

  • client_id
  • client_secret
  • grant_type: client_credentials
  • scope: analytics:read:games

with this token, I tried to get any information with twitch API.

to use API

method: get
url: https://api.twitch.tv/helix/analytics/games?first=5

to get channgel status

method: get
url: https://api.twitch.tv/helix/search/channels?query=test

  • Authorization: Bearer tokentokentoken
  • client-id

get responses well

With same auth code, some works well.
I have no idea with this problem… :frowning:
My application scope is analytics tool in developers console.

Can anybody help me? :pleading_face:

That’s getting you an App Access Token. Not a User Access Token.

Any endpoint that requires a user to grant you permission to access it, such as the games analytics endpoint which requires a developer of that game to grant you permission to access their analytics, you MUST use either the Implicit auth flow if you’re making requests client-side, or the Auth Code flow if you’re making requests server-side.

Those 2 auth flows I mentioned send the user to Twitch where they can explicitly grant you permission to access that data, where as an App Access Token isn’t associated with any user and at no point involves a user granting access to anything so the scopes on it don’t do anything.

The reason your Get Channel Status request works okay is because that doesn’t require any user permissions, and is public data, so an App Access Token will work fine for that request.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.