Twitch API

Twitch provides a few different APIs with varying degrees of functionality. You can hit any of them directly from within an extension, however the MEDKit provides a convenience wrapper for some of the more common use cases.

Requesting Directly

You can use any js library or browser-native method to hit the Twitch API endpoints, passing your Extension Client ID as authorization.

window.fetch('', {
  headers: {
    'Client-ID': '<extension client id>'
.then((response) => response.json())
.then(({ data }) => {
.catch(() => {
  console.error('Failed looking up user info');

The full list of Twitch API endpoints can be found here:

MEDKit Wrapper

The MEDKit already knows your authorization info, so once you’ve created a client, you can call it directly.

const client = new Muxy.TwitchClient();
  .then((users) => {

Either request will return a data object like:

  "broadcaster_type": "partner",
  "description": "Twitch is the world's leading video platform and community for gamers with more than 100 million visitors per month. Our mission is to connect gamers around the world by allowing them to broadcast, watch, and chat from everywhere they play.",
  "display_name": "Twitch",
  "id": "12826",
  "login": "twitch",
  "offline_image_url": "",
  "profile_image_url": "",
  "type": "",
  "view_count": 214488775

Available Functions


Takes an array of usernames and returns an array of full user objects.


Takes an array of Twitch user ids and returns an array of full user objects.