Hello, I’m a hobbyist programmer here making a chatbot. While trying to fix the issues the Helix API updates causes, I tried to do any request, it failed with a status code 401. If I were to use curl with this command:
curl -H 'Authorization: Bearer aaaaaaaaaaaaaaaa' -H 'Client-ID: e3ir6poyf6tbmrq6ag23bfwk29gbth' -X GET 'https://api.twitch.tv/helix/users?id=44322889'
…it would say “Client ID and OAuth token do not match.”
If I were try and validate my token: I get this;
$ curl -H 'Authorization: OAuth aaaaaaaaaaaaaaaa' -X GET https://id.twitch.tv/oauth2/validate
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 184 100 184 0 0 638 0 --:--:-- --:--:-- --:--:-- 638{"client_id":"gp762nuuoqcoxypju8c569th9wz7q5","login":"jimruswick","scopes":["bits:read","chat:edit","chat:read","whispers:edit","whispers:read"],"user_id":"263102519","expires_in":0}
I found a client ID (gp762nuuoqcoxypju8c569th9wz7q5) that’s different then the one I have previously. Weird. If I were to use that as my client ID however…
$ curl -H 'Authorization: Bearer aaaaaaaaaaaaaaaaa' -H 'Client-ID: gp762nuuoqcoxypju8c569th9wz7q5' -X GET 'https://api.twitch.tv/helix/users?id=44322889' % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 417 100 417 0 0 1688 0 --:--:-- --:--:-- --:--:-- 1688{"data":[{"id":"44322889","login":"dallas","display_name":"dallas","type":"","broadcaster_type":"affiliate","description":"Friendly, interactive, and very bald.","profile_image_url":"https://static-cdn.jtvnw.net/jtv_user_pictures/4d1f36cbf1f0072d-profile_image-300x300.png","offline_image_url":"https://static-cdn.jtvnw.net/jtv_user_pictures/51737668f60f7dcc-channel_offline_image-1920x1080.png","view_count":37585}]}
Everything works, now, huh. However, if I were to login to my developer account, I wouldn’t see that client ID there. My bot account didn’t have anything useful either.
Considering that I got completely and utterly confused by the whole API update, and seeing that refreshing a token would need a secret or something like that in the future, I figured that solving that now might be a good idea. I have full access to my chatbot’s account, full access to my own dev account, but no clue where the client ID came from, and even less so the secret. If I am not able to figure out where it is, would it be possible to change the client ID? Or am I missing something entirely.
Thanks for taking the time to read! (hopefully I didn’t butcher the formatting)
EDIT: fixed formatting