# Get channel is being watched

**URL:** <https://discuss.dev.twitch.com/t/get-channel-is-being-watched/33032>\
**Category:** Extensions\
**Created:** [August 10, 2021, 5:48pm UTC](https://discuss.dev.twitch.com/t/get-channel-is-being-watched/33032 "2021-08-10T17:48:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gustavo\_Bispo](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/gustavo_bispo/32/13182_2.png) [@Gustavo\_Bispo](https://discuss.dev.twitch.com/u/Gustavo_Bispo)\
**Post date:** [August 10, 2021, 5:48pm UTC](https://discuss.dev.twitch.com/t/get-channel-is-being-watched/33032/1 "2021-08-10T17:48:44Z")

</div>

Hey guys, I’m developing a Twitch Extension to communicate with my site and show different screens for Broadcaster and Viewers.

I need a way to know what channel my viewer is watching to retrieve his streamer info from my API. Is there a way to do this? So I can show the info for my viewers and I’ll get another info from my API to show for my broadcaster. Is there a way to get the current being watched broadcaster info?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 10, 2021, 5:51pm UTC](https://discuss.dev.twitch.com/t/get-channel-is-being-watched/33032/2 "2021-08-10T17:51:49Z")

</div>

As an extension then the viewer is watching/using your extension on the channel it’s installed upon.

So not sure what you are looking for here.

The channel\_id is returned in the onAuthorised callback.  
So you know which channel the extension is installed upon.

---

<div class="post-metadata">

**Author:** ![Gustavo\_Bispo](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/gustavo_bispo/32/13182_2.png) [@Gustavo\_Bispo](https://discuss.dev.twitch.com/u/Gustavo_Bispo)\
**Post date:** [August 10, 2021, 5:54pm UTC](https://discuss.dev.twitch.com/t/get-channel-is-being-watched/33032/3 "2021-08-10T17:54:25Z")

</div>

> [@BarryCarlyon](#):
>
> As an extension then the viewer is watching/using your extension.

I’m trying to do this, but the `Twitch.ext` is giving me the same channel\_id for two channels

Follow the images

![Screen Shot 2021-08-10 at 14.52.44](https://d2opxh93rbxzdn.cloudfront.net/original/2X/b/b9a457bccee3d2904838e9d282b716d0fcd5a1da.png)

---

<div class="post-metadata">

**Author:** ![Gustavo\_Bispo](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/gustavo_bispo/32/13182_2.png) [@Gustavo\_Bispo](https://discuss.dev.twitch.com/u/Gustavo_Bispo)\
**Post date:** [August 10, 2021, 5:54pm UTC](https://discuss.dev.twitch.com/t/get-channel-is-being-watched/33032/4 "2021-08-10T17:54:58Z")

</div>

![Screen Shot 2021-08-10 at 14.53.40](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/06c2cc6dc135a8fee1660ad9249032a4095a3cdb.png)

---

<div class="post-metadata">

**Author:** ![Gustavo\_Bispo](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/gustavo_bispo/32/13182_2.png) [@Gustavo\_Bispo](https://discuss.dev.twitch.com/u/Gustavo_Bispo)\
**Post date:** [August 10, 2021, 5:55pm UTC](https://discuss.dev.twitch.com/t/get-channel-is-being-watched/33032/5 "2021-08-10T17:55:29Z")

</div>

![Screen Shot 2021-08-10 at 14.53.44](https://d2opxh93rbxzdn.cloudfront.net/original/2X/b/b14385bbdb74dd963d8a3cd117650e71b4341ab1.jpeg)

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 10, 2021, 5:55pm UTC](https://discuss.dev.twitch.com/t/get-channel-is-being-watched/33032/6 "2021-08-10T17:55:33Z")

</div>

Then you are looking at the extension on the same twitch page.

You cannot “see” if a viewer is on/watching a different channel.  
If that channel doesn’t _also_ have the etension installed.  
Then all you know is that they have loaded your extension.

There is no Twitch API to know what someone is watching.  
And all an extension will do is.tell you that they have the page loaded

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 10, 2021, 5:56pm UTC](https://discuss.dev.twitch.com/t/get-channel-is-being-watched/33032/7 "2021-08-10T17:56:58Z")

</div>

This looks like the developer rig.

This suggests you have misconfigured the test environment of the rig.

(Only changed the channel displayed not changed the channel\_id that the extension is on)

 ![image](https://d2opxh93rbxzdn.cloudfront.net/original/2X/1/1d4e5e08b28398fe24c7547bb11b9005c37090c9.png)

IE you only changed the right value and not the left value.

---

<div class="post-metadata">

**Author:** ![Gustavo\_Bispo](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/gustavo_bispo/32/13182_2.png) [@Gustavo\_Bispo](https://discuss.dev.twitch.com/u/Gustavo_Bispo)\
**Post date:** [August 10, 2021, 6:00pm UTC](https://discuss.dev.twitch.com/t/get-channel-is-being-watched/33032/8 "2021-08-10T18:00:58Z")

</div>

So if I want to simulate that my viewer is watching a streamer different than me what I need to do? Change the display channel and use developer rig user?

I configured this way

 ![Screen Shot 2021-08-10 at 15.02.27](https://d2opxh93rbxzdn.cloudfront.net/original/2X/f/f6645f2290095c141f693eae0177c62930f80205.png)

But it doesn’t make sense. If my viewer is watching a channel his Id can’t be equal with the channel\_id because it’s his stream

---

<div class="post-metadata">

**Author:** ![Gustavo\_Bispo](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/gustavo_bispo/32/13182_2.png) [@Gustavo\_Bispo](https://discuss.dev.twitch.com/u/Gustavo_Bispo)\
**Post date:** [August 10, 2021, 6:08pm UTC](https://discuss.dev.twitch.com/t/get-channel-is-being-watched/33032/9 "2021-08-10T18:08:19Z")

</div>

Solved, I think!

It was a problem with my configuration. I didn’t configured the view as Viewer with shared identity.

 ![Screen Shot 2021-08-10 at 15.07.50](https://d2opxh93rbxzdn.cloudfront.net/original/2X/e/e46d39528aad5d5a083e7e8e18f1f0d8463cdac5.png)

This solved my problem

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 10, 2021, 6:09pm UTC](https://discuss.dev.twitch.com/t/get-channel-is-being-watched/33032/10 "2021-08-10T18:09:03Z")

</div>

The “Frame Properties” (left) value sets the channel\_id that the Extension Helper returns.

The “Display Channel” (right) just changes what stream is embedded and ahs no bearing on the extension helper.

> [@Gustavo\_Bispo](#):
>
> It was a problem with my configuration. I didn’t configured the view as Viewer with shared identity.

This only changes the `user_id` not the `channel_id`
