First Time using and API, how do I get started with=

I’m just figuring out how to use Twitch API. In my code I’m trying to simply make a request to get user info.
I am not sure what to replace Client-ID and Client-Secret with. So far, I tried using the “client id” and “client secret” from an application I just registered on the Twitch developer console. When I do this, it gives me error 401, invalid oauth.

Help appreciated :slight_smile:


An apps client secret isn’t an OAuth token.

You should follow the Authentication Docs to learn about how you can create an OAuth token. The docs walk you through creating the app, what the different OAuth flows are, and a step by step process for each of those flows.

Once you’ve got an Access Token from one of those OAuth flows, that is what you will use in the Authorization header.

1 Like

I learned now that I need to use the Client ID and Secret in order to obtain the OAuth token, and I have done so using CUrl, but now I’d like to be able to get the token through python Requests. Here is the code I have so far, CLIENT_ID is set to my client ID. When I call the function, the response returns “error 400, missing client ID”.

for python requests I believe it’s body not data

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