Twitch API Version Update Discussion & FAQ

v5 docs are here! You can check out the docs directly: https://dev.twitch.tv/docs

Or read my blabbering about them here: V5 Documentation is here!

2 Likes

My app uses UTC timestamps wrote down during the stream to quickly find back sections of the stream in VODs for highlighting. However in v5 videos don’t have the recorded_at property anymore so I have to rely on created_at instead which lowers the accuracy of my app.

Any reason for removing it? Please bring it back? :confused:

2 Likes

Any ETA for this bulk endpoint?

Would love to know as well. Should probably start fetching those millions of users sooner than later.

Sorry for the slow response! We’ve been on holiday break. I filed this as a request a while ago, so I’ll check on that and let you know!

Heads up, devs, we’re in the process of normalizing all IDs to strings instead of integers. This was a planned change that wasn’t messaged appropriately (it came up here and was answered in another thread). I’m propagating changes to the docs and blog now to make sure this is noted.

Thanks,
Dallas

1 Like

YAY SNOWFLAKE!

Different query:

https://api.twitch.tv/kraken/users?login=

Exists as an endpoint, for converting v3 usernames to v5 userID’s which, one hopes, will be around forever.

But what exists for converting a display name? For when a display name is in localised such as ジェイコブ aside form Search theres no end point for this, primarily in the case of “new sub” where there is no tag data of use to use to get other information.

Honestly they just need to get sub-messages over to USERNOTICE. There are no other use-cases for looking up a display-name afaik (you’ll always have the actual user-name or -id)

3 Likes

Is there anything in the future to allow dev’s to get multiple users from ID at once from a single request? That way we’re not hammering the API as much and grabbing, for example, 5 or 10 results in a single request rather than doing it 10 times. (ie: https://api.twitch.tv/kraken/channels/#,#,#,#,#,#).

@Andrew_Sokalski That’s in progress. See discussion above. I’ll follow up today to see where it is.

1 Like

Does this go for all ID’s (such as emote ID’s , etc) or just channel and user ID’s?

I would treat all IDs as strings. It’ll be safer that way long-term. You can already see that some IDs have turned into GUIDs in v5. E.g. Channel posts.

Alright, that’s what I figured. Thanks for the answer :slight_smile:

Is it still safe to assume that all user-ids are in [0-9] format, and will continue to be so?

@moocat No planned changes right now, but the IDs could end up being UUIDs like channel posts referenced above. I’ll keep you posted if they’re going to change!

Not sure if it has been mentioned somewhere, I tried to search it but the example blob for “Translating from User Names to User IDs” in the APIv5 document it not correct from the actual response. The actual response, for example, contains the user object in a list, and does not contain the sub-token _links.

Any reason it just not outputs a user object, like in the documents?

@Ocgineer Thanks for the heads up! That’s due to work to make this endpoint a bulk endpoint (i.e. you can pass in multiple values for login). I’ll update the docs soon.

Ah that makes sense to be able to bulk translate names to ids.

I also noticed (due to me not handling nulls yet) that the channel object in https://api.twitch.tv/kraken/users/USERID/follows/channels contains 3 extra fields; “background”, “banner”, and “delay”. This is the only end-point so far I got these extra fields, and it even shows on the documentation, any reason for them to be here or some lingering old fields that can be ignored?

Talking about delay, updating the channel with a new delay returns the channel object on success but this does not include the delay field to verify OR check the delay when for example a bot starts up and the stream is not live yet (as I do know the delay can be found there) any way to get the delay when the stream is offline to set current values on the user interface?

And as last, is https://api.twitch.tv/kraken/chat/CHANNELID/badges going to be expanded in the future or should I just ignore this endpoint and use the currently undocumented endpoints described in [beta] Badge API as those endpoints currently have all badges the documented endpoint does not have. If so makes me wonder what the documented end point is good for :stuck_out_tongue:

~Ocgineer

You kind of have to use the beta badge API to show all chat badges properly.

The bulk login endpoint is here! You can request up to 100 users at a time.

Ex: https://api.twitch.tv/kraken/users?api_version=5&client_id=&login=dallas,3v,BarryCarlyon

CC: @SeeingBlue, @BarryCarlyon, @moocat, @Stricted, @freaktechnik, @CBenni, and probably more.

10 Likes