As documented
It’s just a basic curl request. For example
<?php
$ch = curl_init('https://api.twitch.tv/helix/clips?id=FOO');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Client-ID: yourclientID',
'Authorization: Bearer YourOauthToken'
));
$r = curl_exec($ch);
$i = curl_getinfo($ch);
curl_close($ch);
if ($i['http_code'] == 200) {
$data = json_decode($r);
if (json_last_error() == JSON_ERROR_NONE) {
// do stuff with $data
} else {
echo 'Faiked with ' . $r;
}
} else {
echo 'Failed with ' . $r;
}
This doesn’t cover how to get an oAuth token to use, also not tested, jsut off the top of my head