Is there something wrong with clips api? It’s returning error 404 for any clip I try.
Here’s the code:
$slug = filter_input(INPUT_GET ,'slug', FILTER_SANITIZE_STRING);
$url = "https://api.twitch.tv/kraken/clips/" . $slug;
$clientid = "myclientid";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Client-ID: '.$clientid
));
$output = curl_exec($ch);
$response = json_decode($output, true);
curl_close($ch);
var_dump($response);
Edit: Nevermind. I know why. You can close the topic.