[beta] Badge API

Hi,

This is an undocumented API that we just launched for the horde/alliance badge selection (and will be used for other badges in chat)

https://badges.twitch.tv/v1/badges/global/display?language=en
https://badges.twitch.tv/v1/badges/channels/39141793/display?language=en

The way our chat parses this is loads this data on startup, and then when the badges tag is encountered in a TMI privmsg tag, it looks at the key that matches it in this API response.

Current TMI tag format:
...badges={badge_set_id}/{badge_set_version},{badge_set_id}/{badge_set_version}...

Would appreciate any feedback!

8 Likes

No CORS or jsonp BibleThump

1 Like

Does this mean we’ll finally get bot badges? Kappa

2 Likes

This is the first time you give the right of viewers to put a badge of what I know. Does he now have no other to announce events or something, because I think this idea is great!

how would custom badges be aded to my account

I also wanted to bring a little detail on the badge that téléspecteteurs can add. I’ve always been on Twitch Turbo, and I love having the badge, but when we put another badge for example: /horde , Turbo badge disappears and I find it a pity for those who love the view. If we could fix this please.Thanks

@vivabenfica4 you can type /horde or /alliance to equip the horde/alliance badges. (type /hordeoff or /allianceoff to de-equip)

@ARTI This was a concious decision we made to make sure we didn’t obliterate the limited space we have in chat. We absolutely are looking at how turbo badges fits into any future badge products :slight_smile:

@moocat maybe :wink:

2 Likes

Hey, could you enable jsonp for this endpoint?
Also, I noticed that appending a slash to the url makes it 404, which is inconsistent with the rest of the API

Best regards

@CBenni @3ventic What’s your use case for needing CORs? What isn’t working for you?

@CBenni It’s not uncommon in APIs and sites to 404 for a trailing slash. You should not include a trailing slash for the final resource you’re requesting. That is consistent with tmi.twitch.tv APIs, though we’re doing some org wide API work that will address these types of inconsistencies.

1 Like

Lack of CORS/jsonp means browsers can’t get the data for use on another page, like my chat client.

1 Like

I have a custom chat renderer that needs access to the badges. Currently I am confined to having my own API like http://cbenni.com/api/badges/cbenni similar to what ventic just said.

2 Likes

+1 to @3ventic and @CBenni same reason

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.