# \[beta\] Badge API

**URL:** <https://staging-discuss.dev.twitch.com/t/beta-badge-api/6388>\
**Category:** Chat and IRC\
**Created:** [June 3, 2016, 8:44pm UTC](https://staging-discuss.dev.twitch.com/t/beta-badge-api/6388 "2016-06-03T20:44:24Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![xangold](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/xangold/32/527_2.png) [@xangold](https://staging-discuss.dev.twitch.com/u/xangold)\
**Post date:** [June 3, 2016, 8:44pm UTC](https://staging-discuss.dev.twitch.com/t/beta-badge-api/6388/1 "2016-06-03T20:44:24Z")

</div>

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/global/display?language=en)  
[https://badges.twitch.tv/v1/badges/channels/39141793/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!

---

<div class="post-metadata">

**Author:** ![3ventic](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/3ventic/32/298_2.png) [@3ventic](https://staging-discuss.dev.twitch.com/u/3ventic)\
**Post date:** [June 3, 2016, 8:52pm UTC](https://staging-discuss.dev.twitch.com/t/beta-badge-api/6388/2 "2016-06-03T20:52:02Z")

</div>

No CORS or jsonp BibleThump

---

<div class="post-metadata">

**Author:** ![moocat](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/moocat/32/116_2.png) [@moocat](https://staging-discuss.dev.twitch.com/u/moocat)\
**Post date:** [June 4, 2016, 12:28pm UTC](https://staging-discuss.dev.twitch.com/t/beta-badge-api/6388/3 "2016-06-04T12:28:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ARTI](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/arti/32/2435_2.png) [@ARTI](https://staging-discuss.dev.twitch.com/u/ARTI)\
**Post date:** [June 4, 2016, 11:09pm UTC](https://staging-discuss.dev.twitch.com/t/beta-badge-api/6388/4 "2016-06-04T23:09:42Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![vivabenfica4](https://avatars.discourse-cdn.com/v4/letter/v/a3d4f5/32.png) [@vivabenfica4](https://staging-discuss.dev.twitch.com/u/vivabenfica4)\
**Post date:** [June 4, 2016, 11:10pm UTC](https://staging-discuss.dev.twitch.com/t/beta-badge-api/6388/5 "2016-06-04T23:10:49Z")

</div>

how would custom badges be aded to my account

---

<div class="post-metadata">

**Author:** ![ARTI](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/arti/32/2435_2.png) [@ARTI](https://staging-discuss.dev.twitch.com/u/ARTI)\
**Post date:** [June 5, 2016, 1:22am UTC](https://staging-discuss.dev.twitch.com/t/beta-badge-api/6388/6 "2016-06-05T01:22:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![xangold](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/xangold/32/527_2.png) [@xangold](https://staging-discuss.dev.twitch.com/u/xangold)\
**Post date:** [June 7, 2016, 12:38am UTC](https://staging-discuss.dev.twitch.com/t/beta-badge-api/6388/7 "2016-06-07T00:38:40Z")

</div>

@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 🙂

@moocat maybe 😉

---

<div class="post-metadata">

**Author:** ![CBenni](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/cbenni/32/297_2.png) [@CBenni](https://staging-discuss.dev.twitch.com/u/CBenni)\
**Post date:** [June 8, 2016, 10:36am UTC](https://staging-discuss.dev.twitch.com/t/beta-badge-api/6388/8 "2016-06-08T10:36:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![xangold](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/xangold/32/527_2.png) [@xangold](https://staging-discuss.dev.twitch.com/u/xangold)\
**Post date:** [June 8, 2016, 6:06pm UTC](https://staging-discuss.dev.twitch.com/t/beta-badge-api/6388/9 "2016-06-08T18:06:13Z")

</div>

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

@CBenni It’s [not uncommon](http://programmers.stackexchange.com/questions/186959/trailing-slash-in-restful-api) 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](http://tmi.twitch.tv) APIs, though we’re doing some org wide API work that will address these types of inconsistencies.

---

<div class="post-metadata">

**Author:** ![3ventic](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/3ventic/32/298_2.png) [@3ventic](https://staging-discuss.dev.twitch.com/u/3ventic)\
**Post date:** [June 8, 2016, 6:31pm UTC](https://staging-discuss.dev.twitch.com/t/beta-badge-api/6388/10 "2016-06-08T18:31:06Z")

</div>

Lack of CORS/jsonp means browsers can’t get the data for use on another page, like [my chat client](https://twitchstuff.3v.fi/chat/).

---

<div class="post-metadata">

**Author:** ![CBenni](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/cbenni/32/297_2.png) [@CBenni](https://staging-discuss.dev.twitch.com/u/CBenni)\
**Post date:** [June 8, 2016, 6:37pm UTC](https://staging-discuss.dev.twitch.com/t/beta-badge-api/6388/11 "2016-06-08T18:37:24Z")

</div>

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](http://cbenni.com/api/badges/cbenni) similar to what ventic just said.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://staging-discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [June 8, 2016, 6:57pm UTC](https://staging-discuss.dev.twitch.com/t/beta-badge-api/6388/12 "2016-06-08T18:57:55Z")

</div>

+1 to @3ventic and @CBenni same reason

---

<div class="post-metadata">

**Author:** ![xangold](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/xangold/32/527_2.png) [@xangold](https://staging-discuss.dev.twitch.com/u/xangold)\
**Post date:** [July 8, 2016, 6:59pm UTC](https://staging-discuss.dev.twitch.com/t/beta-badge-api/6388/13 "2016-07-08T18:59:04Z")

</div>

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