alco
March 8, 2022, 2:07pm
1
We recently migrated our code to Helix following this doc: Reference | Twitch Developers
But based on our test, we only get the ff. in the response:
{"data":[],"pagination":{}}
Our call looks like the ff.
URL: https://api.twitch.tv/helix/streams?user_login=
Method: GET
Headers:
Client-ID:
Authorization: Bearer
Content-Type: application/x-www-form-urlencoded
Is this a bug or expected behavior? If a bug, what can we do to fix it? If expected behavior, what can we do to get correct stream info of current authenticated user from our Windows app?
You don’t need this header.
This suggests the user you tried to look up is not currently live.
You only get data if the streamer is live
For example, using the twitchCLI
I am not live
barrycarlyon@Robyn ~ % twitch api get 'streams?user_login=barrycarlyon'
{
"data": [],
"pagination": {
"cursor": ""
}
}
CohhCarnage is live
barrycarlyon@Robyn ~ % twitch api get 'streams?user_login=cohhcarnage'
{
"data": [
{
"game_id": "512953",
"game_name": "Elden Ring",
"id": "39538994809",
"is_mature": false,
"language": "en",
"started_at": "2022-03-08T12:41:17Z",
"tag_ids": [
"6ea6bca4-4712-4ab9-a906-e3336a9d8039",
"1277e554-f8c9-4795-a475-27418d7bd111",
"eaba0ad7-c4e1-4878-b37f-01308dbb65c8",
"96b6073f-450d-4248-8ed4-988e28f3f759",
"7e329e2d-60a1-4a87-9e59-41272c57ab42"
],
"thumbnail_url": "https://static-cdn.jtvnw.net/previews-ttv/live_user_cohhcarnage-{width}x{height}.jpg",
"title": "Elden Ring (Deaths: 7)! - !HFWUnboxing - YouTube.com/CohhDaily - !PC - #EpicPartner Creator Code: COHH",
"type": "live",
"user_id": "26610234",
"user_login": "cohhcarnage",
"user_name": "CohhCarnage",
"viewer_count": 13566
}
],
"pagination": {
"cursor": ""
}
}
alco
March 10, 2022, 2:24pm
3
This suggests the user you tried to look up is not currently live.
I was live for over an hour when I reported and the response never changed.
I’m trying twitchCLI but my client secret is not being recognized - the same one that I use in our app.
You did do a
twitch configure
Ensuring you copy/pasted clientID/secret in full?
Then
twitch token
To generate a token to use and confirm it’s working?
Define not recognised, what is the error returned?
alco
March 10, 2022, 2:44pm
5
Yes.
Yes, but it returned 403 ‘invalid client secret’. Coordinating w/ our ops in case they changed/reset the secret. BRB.
alco
March 10, 2022, 2:55pm
6
Made twitchCLI work, so moving on w/ viewer count test and I still see that the response is still blank.
Sounds like an occurance of GitHub 11
opened 10:56AM - 09 Dec 19 UTC
closed 09:33PM - 15 Aug 23 UTC
product: api
ticketed
**Brief description**
Some small streams are missing from helix streams again… .
This happened recently with small streamers and may be reoccuring
**How to reproduce**
> when testing with https://api.twitch.tv/helix/streams?game_id=6715&first=100 1 to get all live streams for the game Doom the twitch api doesnt return everything, from 16 streams it drops FlexistentialCrisis , hells_quarantine and latalainis . i dont see what causes this or how to actually get all streams. all 3 appear in the twitch website doom section, are live streaming since hours and have a few viewers.
> is this known ?
https://discuss.dev.twitch.tv/t/api-doesnt-return-all-llive-streams/23378
**Expected behavior**
The API to match the directory
**Additional context or questions**
This may also be related to #2 or #3
alco
March 10, 2022, 3:13pm
8
Is there a fix from Twitch’s end or a workaround we can implement on our side? So far, we have at least 4 known cases.
From various testing/reports the stream is reported to EventSub.
But you won’t be able to track viewer counts.
It seems “the black box” discounts/ignores streams based on criteria that we don’t know or it’s a flat out bug.
Either way if you are tracking a “true” stream rather than a “test” stream the problem should go away.