Hello,
I’m working on a little server to respond to stream events and I’ve run into a confusing situation. I will start streaming to test my webhook setup, get a stream up notification, and then get a stream down notification (though I’m still streaming). This is reproducible through the Helix API, but the V5 api correctly shows I am still streaming.
Example (using httpie to manually make requests):
ddrexler@Drexbook-Pro:conmon|$ http -v ‘https://api.twitch.tv/kraken/streams/503254?stream_type=live’ Client-Id:****************************** Authorization:“Bearer ******************************” Accept:application/vnd.twitchtv.v5+json
GET /kraken/streams/503254?stream_type=live HTTP/1.1
Accept: application/vnd.twitchtv.v5+json
Accept-Encoding: gzip, deflate
Authorization: Bearer ******************************
Client-Id: ******************************
Connection: keep-alive
Host: api.twitch.tv
User-Agent: HTTPie/2.2.0HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Cache-Control: no-cache, no-store, must-revalidate, private
Connection: keep-alive
Content-Length: 1287
Content-Type: application/json; charset=utf-8
Date: Mon, 02 Nov 2020 19:08:32 GMT
Expires: 0
Pragma: no-cache
Strict-Transport-Security: max-age=300
Timing-Allow-Origin: https://www.twitch.tv
Vary: Accept-Encoding
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Served-By: cache-sea4446-SEA, cache-sjc10023-SJC
X-Timer: S1604344113.782850,VS0,VS0,VE45{
“stream”: {
“_id”: 40320599246,
“average_fps”: 30,
“broadcast_platform”: “live”,
“channel”: {
“_id”: 503254,
“broadcaster_language”: “en”,
“broadcaster_software”: “”,
“broadcaster_type”: “”,
“created_at”: “2008-04-28T10:16:22.519482Z”,
“description”: “Watch me be bad”,
“display_name”: “aeturnum”,
“followers”: 11,
“game”: “World of Warcraft”,
“language”: “en”,
“logo”: “https://static-cdn.jtvnw.net/jtv_user_pictures/aeturnum-profile_image-e52423744803803f-300x300.jpeg”,
“mature”: false,
“name”: “aeturnum”,
“partner”: false,
“privacy_options_enabled”: false,
“private_video”: false,
“profile_banner”: null,
“profile_banner_background_color”: “”,
“status”: “Wow TBC Atlantiss”,
“updated_at”: “2020-11-02T18:51:41.203231Z”,
“url”: “Twitch”,
“video_banner”: null,
“views”: 437
},
“community_id”: “”,
“community_ids”: ,
“created_at”: “2020-11-02T18:34:44Z”,
“delay”: 0,
“game”: “World of Warcraft”,
“is_playlist”: false,
“preview”: {
“large”: “https://static-cdn.jtvnw.net/previews-ttv/live_user_aeturnum-640x360.jpg”,
“medium”: “https://static-cdn.jtvnw.net/previews-ttv/live_user_aeturnum-320x180.jpg”,
“small”: “https://static-cdn.jtvnw.net/previews-ttv/live_user_aeturnum-80x45.jpg”,
“template”: “https://static-cdn.jtvnw.net/previews-ttv/live_user_aeturnum-{width}x{height}.jpg”
},
“stream_type”: “live”,
“video_height”: 1080,
“viewers”: 1
}
}ddrexler@Drexbook-Pro:conmon|$ http -v ‘https://api.twitch.tv/helix/streams?user_id=503254’ Client-Id:****************************** Authorization:“Bearer ******************************”
GET /helix/streams?user_id=503254 HTTP/1.1
Accept: /
Accept-Encoding: gzip, deflate
Authorization: Bearer ******************************
Client-Id: ******************************
Connection: keep-alive
Host: api.twitch.tv
User-Agent: HTTPie/2.2.0HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Cache-Control: no-cache, no-store, must-revalidate, private
Connection: keep-alive
Content-Length: 27
Content-Type: application/json; charset=utf-8
Date: Mon, 02 Nov 2020 19:08:43 GMT
Expires: 0
Pragma: no-cache
Ratelimit-Limit: 800
Ratelimit-Remaining: 799
Ratelimit-Reset: 1604344124
Strict-Transport-Security: max-age=300
Timing-Allow-Origin: https://www.twitch.tv
Twitch-Trace-Id: a2192f16be752294b9766cf3d2c96c52
Vary: Accept-Encoding
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Ctxlog-Logid: 1-5fa0593b-2a00335f697aff2c181ad4a8
X-Served-By: cache-sea4466-SEA, cache-sjc10068-SJC
X-Timer: S1604344123.049030,VS0,VS0,VE49{
“data”: ,
“pagination”: {}
}
I suspect I am using the Helix API incorrectly, but I don’t understand how.