Get Channel Badges
Returns Twitch channel-specific chat badges. These include subscriber badges with tier levels, bits badges, and other channel-specific badges.
Requires the connections.twitch permission to be enabled on your API key, and you must have a Twitch account connected to your TeamBattles account.
You must provide either a username or id query parameter to identify the channel.
Documentation Index
Fetch the complete documentation index at: https://teambattles.gg/docs/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Channel Identification
You must provide exactly one of these parameters:| Parameter | Description | Example |
|---|---|---|
username | Twitch channel username | ninja |
id | Twitch broadcaster ID | 123456789 |
id is more stable since usernames can change. However, username is more user-friendly
for manual testing.What Are Channel Badges?
Channel badges are custom badges specific to a Twitch channel:- Subscriber badges - Tiered badges (Tier 1, 2, 3) with custom artwork
- Subscriber tenure badges - Special badges for long-term subscribers (3, 6, 12+ months)
- Bits badges - Badges for users who’ve cheered bits
- Custom channel badges - Any other channel-specific badges
Badge Resolution
When displaying chat badges, use this priority:- Channel badges (this endpoint) - Check if the channel has a custom badge
- Global badges (Get Global Badges) - Fall back to global badges
set_id is subscriber, use the channel’s custom images. For moderator, use the global badge.
Caching
The response includes aCache-Control: public, max-age=3600 header. Channel badges can change when streamers update their artwork, but caching for 1 hour is generally safe.
Example Response
Authorizations
API key authentication. Generate an API key from Settings > Developer in the TeamBattles app. Format: tb_xxxxxxxx...
Query Parameters
Twitch channel username (e.g., 'ninja'). Mutually exclusive with id.
Twitch broadcaster ID. Mutually exclusive with username.