# \[PHP\] GET user email

**URL:** <https://discuss.dev.twitch.com/t/php-get-user-email/1279>\
**Category:** API\
**Created:** [December 7, 2014, 11:41am UTC](https://discuss.dev.twitch.com/t/php-get-user-email/1279 "2014-12-07T11:41:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jad3z](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@jad3z](https://discuss.dev.twitch.com/u/jad3z)\
**Post date:** [December 7, 2014, 11:41am UTC](https://discuss.dev.twitch.com/t/php-get-user-email/1279/1 "2014-12-07T11:41:05Z")

</div>

Hey guys!  
I saw this _ **Example Response** _ on github with the  
_ **Authenticated, required scope: user\_read** _ request.

```
   {
  "type": "user",
  "name": "test_user1",
  "created_at": "2011-06-03T17:49:19Z",
  "updated_at": "2012-06-18T17:19:57Z",
  "_links": {
    "self": "https://api.twitch.tv/kraken/users/test_user1"
  },
  "logo": "http://static-cdn.jtvnw.net/jtv_user_pictures/test_user1-profile_image-62e8318af864d6d7-300x300.jpeg",
  "_id": 22761313,
  "display_name": "test_user1",
  "email": "asdf@asdf.com",
  "partnered": true,
  "bio": "test bio woo I'm a test user"
}

```

I’m able to get my oauth code and request some info with :  
[https://api.twitch.tv/kraken?oauth\_token=](https://api.twitch.tv/kraken?oauth_token=)_OAUTH_  
And I get this :

```
{"_links":{"user":"https://api.twitch.tv/kraken/user","channel":"https://api.twitch.tv/kraken/channel","search":"https://api.twitch.tv/kraken/search","streams":"https://api.twitch.tv/kraken/streams/ ******","ingests":"https://api.twitch.tv/kraken/ingests","teams":"https://api.twitch.tv/kraken/teams","users":"https://api.twitch.tv/kraken/users/******","channels":"https://api.twitch.tv/kraken/channels/ ******","chat":"https://api.twitch.tv/kraken/chat/******"},"token":{"valid":true,"authorization":{"scopes":["user_read"],"created_at":"2014-12-06T22:42:24.48719Z","updated_at":"2014-12-07T03:38:44.843441Z"},"user_name":" ******"}}

```

The question is, how do I request the Authenticated, required scope: user\_read info with php curl so I can get the email adres. There is no info on the net about getting this done with php, so I hope you can help me!

Thank you

---

<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:** [December 7, 2014, 2:11pm UTC](https://discuss.dev.twitch.com/t/php-get-user-email/1279/2 "2014-12-07T14:11:11Z")

</div>

You made a request to the token checking endpoint you need to make a request with the OAuth token you have to the user end point

[https://api.twitch.tv/kraken/user?oauth\_token=](https://api.twitch.tv/kraken/user?oauth_token=)_OAUTH_

Here is a link to the [user end point docs](https://github.com/justintv/Twitch-API/blob/master/v3_resources/users.md#get-user).

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [December 17, 2014, 2:12pm UTC](https://discuss.dev.twitch.com/t/php-get-user-email/1279/3 "2014-12-17T14:12:16Z")

</div>

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