# Check user if subscribed to my channel

**URL:** <https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187>\
**Category:** API\
**Created:** [June 18, 2021, 1:38pm UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187 "2021-06-18T13:38:51Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Ragnarok1978](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/ragnarok1978/32/12537_2.png) [@Ragnarok1978](https://staging-discuss.dev.twitch.com/u/Ragnarok1978)\
**Post date:** [June 20, 2021, 10:37pm UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/21 "2021-06-20T22:37:08Z")

</div>

what is the reference of the eventsub documentation?

---

<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 20, 2021, 10:37pm UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/22 "2021-06-20T22:37:36Z")

</div>

> **[EventSub](https://dev.twitch.tv/docs/eventsub/)**
>
> EventSub

---

<div class="post-metadata">

**Author:** ![Ragnarok1978](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/ragnarok1978/32/12537_2.png) [@Ragnarok1978](https://staging-discuss.dev.twitch.com/u/Ragnarok1978)\
**Post date:** [June 20, 2021, 10:39pm UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/23 "2021-06-20T22:39:29Z")

</div>

Thanks Barri, I investigate to see how I do it

---

<div class="post-metadata">

**Author:** ![Ragnarok1978](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/ragnarok1978/32/12537_2.png) [@Ragnarok1978](https://staging-discuss.dev.twitch.com/u/Ragnarok1978)\
**Post date:** [June 20, 2021, 10:50pm UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/24 "2021-06-20T22:50:01Z")

</div>

what is the EVENTSUB\_SECRET where do I get it?

---

<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 20, 2021, 10:50pm UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/25 "2021-06-20T22:50:30Z")

</div>

You choose what that is.

It’s set between you and twitch  
And used to sign payloads

---

<div class="post-metadata">

**Author:** ![Ragnarok1978](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/ragnarok1978/32/12537_2.png) [@Ragnarok1978](https://staging-discuss.dev.twitch.com/u/Ragnarok1978)\
**Post date:** [June 21, 2021, 10:39am UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/26 "2021-06-21T10:39:48Z")

</div>

can you call two URL at the same time? as i apply it i want to call these two URL:

curl\_init(‘[https://api.twitch.tv/helix/subscriptions?broadcaster\_id=507703972&user\_id=](https://api.twitch.tv/helix/subscriptions?broadcaster_id=507703972&user_id=)’ . $logged\_in\_user\_id);  
curl\_init(‘[https://api.twitch.tv/helix/users](https://api.twitch.tv/helix/users)’);

---

<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 21, 2021, 10:49am UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/27 "2021-06-21T10:49:43Z")

</div>

Not at the “same time” no.

Just do the cURL’s one after the other.

---

<div class="post-metadata">

**Author:** ![Ragnarok1978](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/ragnarok1978/32/12537_2.png) [@Ragnarok1978](https://staging-discuss.dev.twitch.com/u/Ragnarok1978)\
**Post date:** [June 21, 2021, 11:26am UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/28 "2021-06-21T11:26:52Z")

</div>

Barri as use; after here:

$ch = curl\_init(‘[https://api.twitch.tv/helix/subscriptions?broadcaster\_id=507703972&user\_id=](https://api.twitch.tv/helix/subscriptions?broadcaster_id=507703972&user_id=)’ . $logged\_in\_user\_id);

---

<div class="post-metadata">

**Author:** ![Ragnarok1978](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/ragnarok1978/32/12537_2.png) [@Ragnarok1978](https://staging-discuss.dev.twitch.com/u/Ragnarok1978)\
**Post date:** [June 21, 2021, 11:31am UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/29 "2021-06-21T11:31:10Z")

</div>

if i can i want to do this:

Step 1) Setup an oAuth loop to get a token for yourself that will read subscribers  
Step 2) Store that token and the refresh token in a database  
Step 3) user logs into your website as them  
Step 4) use the users token to get their user ID  
Step 5) call the subscribers API with their userID and your userID (as the broadcasterID) **but your oAuth token** that you load up from the database.

---

<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 21, 2021, 12:29pm UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/30 "2021-06-21T12:29:19Z")

</div>

Then write the code to meet that workflow.

I’m not sure what you are asking.

---

<div class="post-metadata">

**Author:** ![Ragnarok1978](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/ragnarok1978/32/12537_2.png) [@Ragnarok1978](https://staging-discuss.dev.twitch.com/u/Ragnarok1978)\
**Post date:** [June 21, 2021, 12:34pm UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/31 "2021-06-21T12:34:37Z")

</div>

I want to do this, from this topic:

> [@Check if user is subscriber](https://staging-discuss.dev.twitch.com/t/check-if-user-is-subscriber/29457):
>
> Hi, Unfortunately, I can’t get any further. Users can log in to my website using the TwitchLogin. The login works perfectly according to this pattern: MY WORKFLOW Click on the button ([https://id.twitch.tv/oauth2/authorize](https://id.twitch.tv/oauth2/authorize)) Get Code Get Token from [https://id.twitch.tv/oauth2/token](https://id.twitch.tv/oauth2/token) Get user data with tokens from [https://api.twitch.tv/helix/users](https://api.twitch.tv/helix/users) But now I would like to check whether the user is a subscriber in my channel. After hours of searching on Google and here in the forum, I only f…

---

<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 21, 2021, 12:35pm UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/32 "2021-06-21T12:35:41Z")

</div>

Then do that

I’ve provided enough infromation for you to go do that.  
And a number of code examples.

The only thing left that I can do to help you is to literally write it for you?

---

<div class="post-metadata">

**Author:** ![Ragnarok1978](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/ragnarok1978/32/12537_2.png) [@Ragnarok1978](https://staging-discuss.dev.twitch.com/u/Ragnarok1978)\
**Post date:** [June 21, 2021, 12:37pm UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/33 "2021-06-21T12:37:42Z")

</div>

Thanks Barri, I’ll see if I get it, I’m using your github code

---

<div class="post-metadata">

**Author:** ![Ragnarok1978](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/ragnarok1978/32/12537_2.png) [@Ragnarok1978](https://staging-discuss.dev.twitch.com/u/Ragnarok1978)\
**Post date:** [June 21, 2021, 3:23pm UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/34 "2021-06-21T15:23:59Z")

</div>

Barri, is there any way to know if a user is seeing me

---

<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 21, 2021, 3:25pm UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/35 "2021-06-21T15:25:49Z")

</div>

> [@Ragnarok1978](#):
>
> know if a user is seeing me

I don’t understand what you mean “seeing me”

---

<div class="post-metadata">

**Author:** ![Ragnarok1978](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/ragnarok1978/32/12537_2.png) [@Ragnarok1978](https://staging-discuss.dev.twitch.com/u/Ragnarok1978)\
**Post date:** [June 21, 2021, 3:27pm UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/36 "2021-06-21T15:27:38Z")

</div>

> [@BarryCarlyon](#):
>
> I don’t understand what you mean “seeing me”

Barri, is there any way to know if a user is seeing me

---

<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 21, 2021, 3:27pm UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/37 "2021-06-21T15:27:52Z")

</div>

What is “seeing me”

---

<div class="post-metadata">

**Author:** ![Ragnarok1978](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/ragnarok1978/32/12537_2.png) [@Ragnarok1978](https://staging-discuss.dev.twitch.com/u/Ragnarok1978)\
**Post date:** [June 21, 2021, 3:28pm UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/38 "2021-06-21T15:28:13Z")

</div>

online watching my channel

---

<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 21, 2021, 3:28pm UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/39 "2021-06-21T15:28:42Z")

</div>

There is no API that provides viewing data.

So no

---

<div class="post-metadata">

**Author:** ![Ragnarok1978](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/ragnarok1978/32/12537_2.png) [@Ragnarok1978](https://staging-discuss.dev.twitch.com/u/Ragnarok1978)\
**Post date:** [June 21, 2021, 3:30pm UTC](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187/40 "2021-06-21T15:30:24Z")

</div>

and online user

[Previous page](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187.md?page=1)

[Next page](https://staging-discuss.dev.twitch.com/t/check-user-if-subscribed-to-my-channel/32187.md?page=3)
