I’m not well-versed in web-based code, so my apologies in advance.
I want to be able to grab a few bits of private info from my own channel (bits:read and channel:read:subscriptions) as well as grab profile pictures and usernames of people in my chat. Previously, I didn’t have subscriptions and bits working, but the picture scraping worked fine.
With the recent change requiring access tokens to access any helix endpoints, I thought I’d go ahead and try to get everything working again.
- I created the url to authorize my bot to have the above scopes on my channel
- I used said url to get an authorization code
- I used the authorization code to get a json object containing an access token and a refresh token
- I am able to use the refresh token to get a new json of token data.
However, I am unable to use this token to do anything. When I try to validate it, it returns 401 invalid access token regardless of whether it said "Bearer " or "OAuth
When I try to grab my own user data from the helix endpoint, I get a different response based on what the authorization header says. If it says "Bearer ", I get a 401 invalid access token, and if it says "OAuth ", I get a 401 OAuth token is missing.
I don’t understand why the tokens I’m getting aren’t valid. Can anybody shed some light on this?