My main problem is that I understand the doc in the most parts but I dont know how tow converte this information:
curl -H 'Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2' \ -X GET 'https://api.twitch.tv/helix/streams?user_login=foo'
to php code.
Thats what I have done yet:
<?php $ClientID = array('Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2'); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, $ClientID); curl_setopt($ch, CURLOPT_URL, "https://api.twitch.tv/helix/streams?user_login=foo"); curl_close($ch); ?>
In my console there is only one message with:
{“error”:“Bad Request”,“status”:400,“message”:“No client id specified”}