This is strange … it works locally on my laptop but as soon as I upload to
webhost get a 401 when querying …
but the token generates ok
Got tokenstdClass Object ( [access_token] => 1o191c1xxxxxxxxxxxxxxx2k897 [expires_in] => 5227854 [token_type] => bearer )
However this is the response from my query
array(3) { ["error"]=> string(12) "Unauthorized" ["status"]=> int(401) ["message"]=> string(22) "OAuth token is missing" }
I’m querying https://api.twitch.tv/helix/search/channels?query=’.$catname.’&live_only=true&first=100
$catname is a predefined variable that url encodes the game name
Like I said it works fine on local host however it doesnt work in live
and yes I have added the correct url to the application request url as well