Hey,
I’m trying to get the Users Broadcaster-Type by using shell_exec. But I dont get a response.
public function testpartner($UserIDCP){
$urll = shell_exec ("curl -H 'Client-ID: MyClientID' \
-X GET 'https://api.twitch.tv/helix/users?id={UserIDCP}'");
$json_obj = json_decode($urll);
$partna = $json_obj->data[0]->broadcaster_type;
}
With $UserIDCP I get the User-ID and thats correct. I checked it.
But if i want to print $partna I dont get a response. Is it a server failure or ist there a mistake in my code?