Error check subscribe

why does the code give an error when trying to check if the auto-registered user is subscribed to another channel :error: ‘Not Found’, status: 404, message…

const streamerId = ‘’;
const apiUrl = https://api.twitch.tv/helix/subscriptions/user?broadcaster_id=${streamerId}&user_id=${user.id};

const headers = {
‘Client-Id’: ‘’,
‘Authorization’: 'Bearer ',
};

// Создаем запрос
const requestOptions = {
method: ‘GET’,
headers: headers,
};

In general the standard format for non 2xx responses by Twitch is a response with the JSON object containing an error string, a message string, and a status number.

As documented for the Check User Subscription endpoint, when a user isn’t subscribed to the broadcast a 404 is the intended response and so you got an error response with the appropriate error, status, and message for that.

Is Check User Subscription different from Check User Follow?

because there is still the essence of a paid subscription

but the thing is that this user is following this channel)

Subscriptions and Follows are 2 separate things.

Subscriptions are paid products (and can be checked with Subscription endpoints like the one earlier in this tread), and allows access to things like channel emotes, chat if the channel is in sub-only mode, no ads on the channel (if the streamer has configured it that way), etc…

Following a channel is entirely free, and allows users to get notifications of when a channel is online and things of that nature. You can check if a user is following a channel with the Get Channel Followers endpoint.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.