Hey guys this is my first API and this should be simple I’m just trying to get the total amount of subscriptions in a channel, but I’m getting this response from the request: {“total”:0,“data”:[],“pagination”:{}}
this is my code:
$OAuth_temp = self::GetTwitchToken($client_id, $tw_oauth);
$channelsApi = 'https://api.twitch.tv/helix/webhooks/subscriptions';
$channelName = $tw_channel_username;
$clientId = $client_id;
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer ' . $OAuth_temp['access_token']
),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_URL => $channelsApi
));
$response = curl_exec($ch);
curl_close($ch);
// $response = json_decode($response, true);
return $response;
any thoughts ?