Invalid OAuth token help

I’m getting error:

{“error”:“Unauthorized”,“status”:401,“message”:“Invalid OAuth token”}

> import requests
> 
> # Set your client ID and OAuth token
> client_id = "***"
> oauth_token = "***"
> broadcaster_username = "blizzardid"
> 
> # Define the API endpoint URL
> url = f"https://api.twitch.tv/helix/users?login={broadcaster_username}"
> 
> # Set headers with client ID and OAuth token
> headers = {
>     "Client-ID": client_id,
>     "Authorization": f"Bearer {oauth_token}"
> }
> 
> 
> # Make a GET request to fetch the broadcaster's ID
> r = requests.get(url, headers=headers)
> 
> print(r.text)

This would suggest you have tried to use the client password also know as client secret (not sure why you have it saying client password) as an oAuth token

it is NOT an oAuth token it is used to generate oAuth tokens.

Since you appear to be using Python here is a Python example https://github.com/BarryCarlyon/twitch_misc/tree/main/authentication/app_access_tokens/python