User does not exist, when getting channel follows, but he does

I’m trying to get https://api.twitch.tv/kraken/channels/<channel ID>/follows

As <channel ID> I use <user ID> (found that channel ID = user ID somewhere on this forum, and as well when I get

https://api.twitch.tv/kraken/channel

the _id included in the response is equal to the _id I’m getting from

https://api.twitch.tv/kraken/user
).

As response from the first request (channels/<channel ID>/follows) I’m getting 404 User <ID> does not exist.

What I am missing?

I found out: it is actually user name I should use, not user ID.

Twitch API currently defaults to v3

v3 requires username
v5 requires userID

You are advised to use v5 and userID and make sure you are setting a version ID in the headers.

As outlined here:

https://dev.twitch.tv/docs/v5/guides/using-the-twitch-api

For example:

curl -H 'Accept: application/vnd.twitchtv.v5+json' \
-H 'Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2' \
-X GET https://api.twitch.tv/kraken/users?login=dallas,dallasnchains

Note the Accept header.

If you don’t specify a version, you’ll break when Twitch Changes the default API version

2 Likes

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