Please also let me know if the ID I am using as the Broadcaster ID is correct or not. If it is incorrect, please advise me where I can get the correct Broadcaster ID.
Am I doing something wrong in this flow? If yes, please guide me.
To Get if I barrycarlyon is a subscriber of cohhcarnage
Get Users - https://api.twitch.tv/helix/users?login=barrycarlyon for an ID of 15185913
And thus to 1 to 1 subscriber lookup is https://api.twitch.tv/helix/subscriptions?broadcaster_id=26610234&user_id=15185913
That’ll return an data array of one or no items to represent if barrycarlyon is a paid subscriber of cohhcarnage
The calls to Get users will take any token the call to Get Broadcaster Subscriptions assumes you are using a token for the broadcaster with the relevant scopes (ignoring Twitch Extension Clients here for simplicity)
You omitted/censored the ID’s so I can’t help to see what/whom you’ve called
Your screenshot suggests you convert a login to an ID and that user doens’t have any subscriptions
This indicates you
converted a login to an ID
got a token for that ID with the required scopes
called get broadcaster subscriptions with that token and the ID and no results were returned indicating the user id in the broadcaster_id key has no subscribers (or is not enrolled in the subscribers program)
As shown in the first screenshot the broadcaster_type is blank, so you are getting a blank response as they can’t have subscribers
Your approach is correct, just the user you looked up cannot have paid subscribers and thus doesn’t have any paid subscribers