Get streams summary replacement in new api?


#1

GET https://api.twitch.tv/kraken/streams/summary

I tired this endpoint in helix to no avail. Is there a replacement or do I have to count every stream?


#2

Works ok for me:

{
"channels": 24585,
"viewers": 743808
}

Make sure your request includes the v5 accept header

curl -H 'Accept: application/vnd.twitchtv.v5+json' \
-H 'Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2' \
-X GET 'https://api.twitch.tv/kraken/streams/'

#3

hello barry,
i think it’s deprecated now,i get 410 error


#4

You get a 410 if you omit the v5 header

Works fine here:

summary:

Please read

The migration guide:

The documentation for this endpoint

Note the requirement to specify two headers

A ClientID and an Accept header


#5

no i get it with v5 header :confused:
image


#6

Your code is wrong.

request.Accept should be request.Headers.Add


#7

sorry barry but it works good like this …
i’m using System.Net.Http,so it works


#8

i found the problem and it work’s perfectly :smiley:
image
image