Don't know how to get OAuth or How to use it in My Curl Function

function updateStreamer($x) {

$ch = curl_init('https://api.twitch.tv/helix/users?login=' . $x);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Client-ID: xxxxxxxx'));
$data = curl_exec($ch);
$data = json_decode($data);

var_dump($data);

}


object(stdClass)#3 (3) {
[“error”]=>
string(12) “Unauthorized”
[“status”]=>
int(401)
[“message”]=>
string(22) “OAuth token is missing”
}

Covers oAuth and the types of tokens,

From your code snippet I have no idea what kind of token you may need

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.