Announcing the Latest Helix Endpoints and Hype Train API

Thanks for the quick questions and comments! First, the blog post is now live. Second, I’ll get all doc comments to the team for updates (stream key is known and will be added momentarily). Third, I’ll get product questions to the API to provide the best answers :+1:

1 Like

So I have a question concerning the addition of channels to Helix. Is there a distinct difference between what a “channel” and a “user” is? Because in Kraken, they were essentially the same thing. Going by the new endpoint documentation, a channel seems to be just a stripped down version of a user combined with information that can also be found by requesting the /streams endpoint. This kind of muddies the water a bit, something that I was happy to see gone up until now with Helix.

Furthermore, the fact that you now have two endpoints that can update a “user’s” data is a little convoluted. We can update a user’s description using /users and now the channel information with /channels. This is also ignoring that you update a user’s extensions under child /users endpoints. Are there any plans to consolidate this into one cohesive endpoint/object? Because right now I’m getting flashbacks to the jaded Kraken user/channel experience.

thanks for the update!
The documentation isn’t correctly formated for getStreamKey:
https://dev.twitch.tv/docs/api/reference#get-stream-key

If title is the stream title, what are status and description for Modify Channel Info?

Neither of them appear in the GET endpoint, so they are documentation errors/stuff removed but left in the docs

Should be PATCH https://api.twitch.tv/helix/channels work with editor user? I can change game/title with kraken endpoint as caster and editor, I can change it with caster, but editor have 401 error

{
  "error": "Unauthorized",
  "status": 401,
  "message": "incorrect user authorization"
}

I haven’t tested it myself but it requiring specifically the broadcasters token is what I would expect.

A broadcaster has to explicitly grant who can edit their channel, either by going through the OAuth process themselves and granting a token with that scope to a 3rd party, or by selecting a user and making them an editor. If that editor could then go on to go through the OAuth process they could be granting any number of 3rd parties access to edit that broadcasters channel, potentially without their knowledge.

Editor have access to broadcaster dashboard and can change title/game of such stream. In old kraken endpoint it was working as expected.

https://help.twitch.tv/s/article/Managing-Roles-for-your-Channel?language=en_US

Editors are able to access a channel’s dashboard and help streamers manage their channel by performing the following actions:

Editing stream info
Running commercial break
Editing video info
Uploading videos
Creating events
Starting Reruns and Premieres
Downloading Past Broadcasts

If this is listed, editor should be able to change game/title of stream through API.

Yes I have that user set as editor.

E.g. I have bot account set as editor, I should be able to change title/game with bot and not as broadcaster, you can see history of changes in dashboard and that won’t work if broadcaster account is forced.

Just because functionality on the site is done a certain way doesn’t mean that the same functionality is intended to be exposed by the 3rd party API. Similarly, not all Kraken functionality is going to be provided in Helix.

From a security standpoint it’s beneficial for the broadcaster to be the one in control of which 3rd parties have access to that functionality over their channel. So rather than your bot granting your app (or any app, potentially unknown to the broadcaster) permission to do those things for the broadcasters channel, it’ll be that broadcaster granting your app those permissions.

Sure, I understand, that’s why I asked if it is intended or just oversight so I can properly update code :slight_smile:

Edit: Also generally if you give some user some permissions, it is carried across all usage independent on API, UI or whatever so you have consistency unless you can set API access independently. But that’s just my opinion, nothing else.

Just want to know what is correct approach to this change.

And not to nitpick

You can see broadcaster_id yes string Provided broadcaster_id must match the user_id in the auth token.

Which means you can see only yours channel mods with broadcaster oauth

There is no such condition on Reference | Twitch Developers

Which means it could just be a documentation bug since there are quite a few and some old bugs in the docs reintroduced when the new docs were added. The phrasing about “matching” has only recently been added to the docs (and in some cases removed by accident in this update). So the docs are incorrect in a bunch of places especially round the subject of oAuth/what token is needed.

It is safe to assume that for endpoints using a scope, the broadcaster_id must match the user_id that the token belongs to.

Are two examples

Ok, thanks!

Seems like there’s a bug with the Modify Channel Information endpoint where the response on error has a JSON-stringified object inside its “message” value. Tested by setting the title to a banned word.

“error”:“Bad Request”,“status”:400,“message”:"{“status”:400,“message”:“Status contains banned words.”,“error”:“Bad Request”,“error_code”:“status_use_banned_words”}"}

I assume this is not intended?

1 Like

Another bug happens when setting the game/category with the Modify Channel Information endpoint, where it doesn’t update on Kraken.

It updates correctly on the Twitch page and dashboard, and in the Helix endpoints.

The same does not apply when setting the title from the same endpoint.

EDIT: This seems to be a more serious issue, since the Kraken API still isn’t showing the up-to-date game after now more than 4 hours since it was set.

1 Like

Is there a list of the event types to expect in the Hype Train response? I looked at the API documents and all I see is “hypetrain.progression” in the example output. Would be nice to know the others so we can code against it without having to ask our users to push a hype train.

hypetrain.progression is the only event type, there’s nothing else to a hypetrain. Everything from the first progression message that is the start of the hype train until the final contribution is all just progression events.

1 Like

@RAnders00
The documentation for the response was not updated, apologies for the confusion. status and description will be removed from the documentation, and game_name will be added. The example on the right is correct.

I will check on the intended empty value for game (null, empty string, etc)

You are correct about the 200 return code, this will be updated as well. It was a copy/paste error from the modify endpoint.

I will also check on how many broadcaster_ids can be specified and request this be added to the docs; both the maximum and the fact that multiple can be provided.

@WLG3R
Good catch, will pass that along to update the delete follow example.

@Six
Sorry for the confusion. status and description should not be documented as part of the get or modify channel information endpoints; these were removed during our beta process. User and Channel objects will not be consolidated, the intended differentiation is that a channel object contains the information about a channel page that belongs to a user while a user object contains information about the person.

@Hugo
Noted, the Get Stream Key formatting should be updated soon.

@tduva
Apologies for the confusion, this is an error. status and description will be removed.

@sogehige
I will double check with the team that only broadcasters are intended to have access through their oauth token or if editors should be allowed.

@moocat
Thanks for the reports. Passing both to the team.

@fiercekittenz
We’ll be sure to document more types should they become available, but yes, hypetrain.progression is the only one currently.

3 Likes

Is new channel endpoint working correctly? I changed game through new endpoint. If I go to my channel, home shows different game (game before change from new endpoint) than API has. If I click on chat, and it shows channel, it shows correct game. Clips and highlights are from old game as well.

Since Helix can handle User follow/unfollow, can we have the same functionality for Games as well? Imo from the users perspective there is no difference between the two, but it’s a bit wonky that as devs we can do only one of these.

I know it’s not Xmas, but there is one thing i would really like, a random endpoint. We could set the min and the max viewer count (optionally for further filtering we would have language and game) and the end point would return random streams with viewers between min and max, with a limit if necessary.
Personally i want to use this to give access to smaller streamers.