# Use API to check if channel is Hosting

**URL:** <https://staging-discuss.dev.twitch.com/t/use-api-to-check-if-channel-is-hosting/15088>\
**Category:** API\
**Created:** [April 4, 2018, 3:32pm UTC](https://staging-discuss.dev.twitch.com/t/use-api-to-check-if-channel-is-hosting/15088 "2018-04-04T15:32:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fb502902](https://avatars.discourse-cdn.com/v4/letter/f/a5b964/32.png) [@fb502902](https://staging-discuss.dev.twitch.com/u/fb502902)\
**Post date:** [April 4, 2018, 3:32pm UTC](https://staging-discuss.dev.twitch.com/t/use-api-to-check-if-channel-is-hosting/15088/1 "2018-04-04T15:32:10Z")

</div>

Hello,

I am at present making an extension and at the hour current I have succeeds in check if the stream is live ([https://api.twitch.tv/kraken/streams/LIVE?client\_id=CLIENTID](https://api.twitch.tv/kraken/streams/LIVE?client_id=CLIENTID)).

But how check if the stream is hosting an other ?

Thank you in advance for your answers

---

<div class="post-metadata">

**Author:** ![modesttim](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/modesttim/32/10753_2.png) [@modesttim](https://staging-discuss.dev.twitch.com/u/modesttim)\
**Post date:** [April 4, 2018, 6:26pm UTC](https://staging-discuss.dev.twitch.com/t/use-api-to-check-if-channel-is-hosting/15088/2 "2018-04-04T18:26:15Z")

</div>

There is an unsupported API you can use for this; Though keep in mind that it’s unsupported, undocumented, and can go away or change at any time.

[https://tmi.twitch.tv/hosts?include\_logins=1&host=51684790](https://tmi.twitch.tv/hosts?include_logins=1&host=51684790)

Hosting example response

```auto
{
  "hosts": [
    {
      "host_id": 51684790,
      "target_id": 88560344,
      "host_login": "modesttim",
      "target_login": "weetbot",
      "host_display_name": "ModestTim",
      "target_display_name": "WeetBot"
    }
  ]
}

```

`51684790` is `ModestTim` which is the channel we want to see if is hosting and `88560344` is `WeetBot` aka the target which is who we are hosting.

Not hosting example

```auto
{
  "hosts": [
    {
      "host_id": 51684790,
      "host_login": "modesttim",
      "host_display_name": "ModestTim"
    }
  ]
}

```

---

<div class="post-metadata">

**Author:** ![fb502902](https://avatars.discourse-cdn.com/v4/letter/f/a5b964/32.png) [@fb502902](https://staging-discuss.dev.twitch.com/u/fb502902)\
**Post date:** [April 6, 2018, 4:29pm UTC](https://staging-discuss.dev.twitch.com/t/use-api-to-check-if-channel-is-hosting/15088/3 "2018-04-06T16:29:46Z")

</div>

Thank you very much I go and look at that

---

<div class="post-metadata">

**Author:** ![system](https://d2spem0quai2ol.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://staging-discuss.dev.twitch.com/u/system)\
**Post date:** [May 6, 2018, 4:29pm UTC](https://staging-discuss.dev.twitch.com/t/use-api-to-check-if-channel-is-hosting/15088/4 "2018-05-06T16:29:50Z")

</div>

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