How to get correct follows of user?

String url = “https://api.twitch.tv/kraken/users/follows?from_id=” + name;

    con.setRequestMethod("GET");

    con.setRequestProperty("Accept", "application/vnd.twitchtv.v5+json");
    con.setRequestProperty("Client-ID", "xv***************sjjhq3nzm");

I am trying to use this request but getting 400 bad request
GET https://api.twitch.tv/helix/users/follows?from_id=
is user ID == name of channel or user ID == Client-ID? Have tried both but did not work for me, what i am doing wrong?

That is the wrong URL, and param for the v5 endpoint https://dev.twitch.tv/docs/v5/reference/users#get-user-follows

For the Helix endpoint as you can see from the docs https://dev.twitch.tv/docs/api/reference#get-users-follows the from_id field is the channels ID, such as 23161357 as used in the example. User ID and Client ID are 2 separate things.

1 Like

Thank you for reply.
Where i can find my channel ID? :face_with_monocle:
Is only way to get ID is https://dev.twitch.tv/docs/v5/reference/users#get-user and take ID from JSON?

v5 is deprecated, so you should use the Helix Get Users endpoint https://dev.twitch.tv/docs/api/reference#get-users

1 Like