0

I tried to get twitch api information but request dosent show anything

using (var httpClient = new HttpClient())
            {
                using (var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.twitch.tv/helix/streams?game_id=33214"))
                {
                    request.Headers.TryAddWithoutValidation("Client-ID", "ozzdg2w66nugbxdhrzzy5d7z");

                    var response = await httpClient.SendAsync(request);
                }
            }

I would use api request to get output precise number, but twitch channel names are not working anymore and you need channel ID which are private.

Basically what I need are 3 things:

Is channel live (true/false)

Live viewership count

thumbnail picture

Is there a way get those data? Or I need to know the secret ID?

1 Answers1

0

I didn't get the conection between your topic and the description of your problem. But if you want to request stream information you have to use the right endpoint url. Like: https://api.twitch.tv/helix/streams?user_login=USER_NAME

For more information read the reference documentation https://dev.twitch.tv/docs/api/reference/#get-streams

Fusselchen
  • 382
  • 1
  • 4
  • 12