So i have looked through all the different references and forms - any way i use it i still get a 400
if i remove the oauth - i get a “missing oauth” error and if i add it back - you can see what i get below.
cleaned up code:
curl -X POST ‘https://id.twitch.tv/oauth2/token?client_id=’$client_id’&client_secret=’$client_secret’&grant_type=client_credentials&scope=user:read:email’ >> token.txt && awk -F ‘"’ ‘{print $4}’ token.txt >> token_only.txt
token=$(cat token_only.txt)
Get User ID
curl -H 'Client-ID: '$client_id -H 'Authorization: Bearer '$client_secret -H 'Authorization: OAuth '$token 'https://api.twitch.tv/helix/users?login=’$name -v
Remove Token for next go
rm token*
this is what the curl is sending as get request to api.twitch.tv:
GET /helix/users?login=$name HTTP/2
and getting this back:
400 Bad Request