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”:{}}
The reason you’re getting an empty data array back is because the endpoint you’re using, Get Webhook Subscriptions, has nothing to do with getting the number of subscriptions to a channel. That endpoint is for listing the webhook subscriptions your app has, and as you’re getting an empty data array that means your app isn’t subscribed to any topics.
if you want to get the total amount of users subscribed to a channel you need to use the Get Broadcaster Subscriptions endpoint which you will need an access token with the channel:read:subscriptions scope that has been granted to you by the channel you’re attempting to access data for.