# Getting date someone subscribed

**URL:** <https://staging-discuss.dev.twitch.com/t/getting-date-someone-subscribed/2169>\
**Category:** API\
**Created:** [May 3, 2015, 5:43pm UTC](https://staging-discuss.dev.twitch.com/t/getting-date-someone-subscribed/2169 "2015-05-03T17:43:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Avery246813579](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/avery246813579/32/638_2.png) [@Avery246813579](https://staging-discuss.dev.twitch.com/u/Avery246813579)\
**Post date:** [May 3, 2015, 5:43pm UTC](https://staging-discuss.dev.twitch.com/t/getting-date-someone-subscribed/2169/1 "2015-05-03T17:43:19Z")

</div>

I am trying to get the date that someone sub’s to a stream using php.

I am using the [following function](http://pastebin.com/7TfZ4y4R), but it keeps return Unauthorized. [This](http://pastebin.com/rEAwTSwZ) is where I call the function. I know that the token and username are correct, but I still get unauthorized. Thanks, Avery.

---

<div class="post-metadata">

**Author:** ![george](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/george/32/120_2.png) [@george](https://staging-discuss.dev.twitch.com/u/george)\
**Post date:** [May 3, 2015, 5:57pm UTC](https://staging-discuss.dev.twitch.com/t/getting-date-someone-subscribed/2169/2 "2015-05-03T17:57:04Z")

</div>

Which scope did you request? and for which Twitch account (broadcaster or subscriber)?

---

<div class="post-metadata">

**Author:** ![Avery246813579](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/avery246813579/32/638_2.png) [@Avery246813579](https://staging-discuss.dev.twitch.com/u/Avery246813579)\
**Post date:** [May 3, 2015, 6:09pm UTC](https://staging-discuss.dev.twitch.com/t/getting-date-someone-subscribed/2169/3 "2015-05-03T18:09:32Z")

</div>

> [@george](#):
>
> scope

My scopes: user\_read channel\_subscriptions  
I am also getting the subscribers account. Do I need to add a scope?

---

<div class="post-metadata">

**Author:** ![george](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/george/32/120_2.png) [@george](https://staging-discuss.dev.twitch.com/u/george)\
**Post date:** [May 3, 2015, 6:13pm UTC](https://staging-discuss.dev.twitch.com/t/getting-date-someone-subscribed/2169/4 "2015-05-03T18:13:36Z")

</div>

Per the [documentation](https://github.com/justintv/Twitch-API/blob/master/v3_resources/subscriptions.md#get-channelschannelsubscriptionsuser) for the endpoint you are using:

**GET /channels/:channel/subscriptions/:user**

Returns a subscription object which includes the user if that user is subscribed. **Requires authentication for `:channel`.**

Authenticated, required scope: **`channel_check_subscription`**

---

<div class="post-metadata">

**Author:** ![Avery246813579](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/avery246813579/32/638_2.png) [@Avery246813579](https://staging-discuss.dev.twitch.com/u/Avery246813579)\
**Post date:** [May 3, 2015, 6:26pm UTC](https://staging-discuss.dev.twitch.com/t/getting-date-someone-subscribed/2169/5 "2015-05-03T18:26:27Z")

</div>

I changed the scope, and it is still giving me unauthorized. Could I be calling something wrong?

---

<div class="post-metadata">

**Author:** ![Avery246813579](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/avery246813579/32/638_2.png) [@Avery246813579](https://staging-discuss.dev.twitch.com/u/Avery246813579)\
**Post date:** [May 4, 2015, 4:54am UTC](https://staging-discuss.dev.twitch.com/t/getting-date-someone-subscribed/2169/6 "2015-05-04T04:54:06Z")

</div>

I do not think it is scope, since I used all scopes and it still does not work.

---

<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:** [June 3, 2015, 4:54am UTC](https://staging-discuss.dev.twitch.com/t/getting-date-someone-subscribed/2169/7 "2015-06-03T04:54:19Z")

</div>

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