# Including email in token obtained through PKCE

**URL:** <https://community.auth0.com/t/including-email-in-token-obtained-through-pkce/7760>\
**Category:** Get Help\
**Tags:** pkce, email, apis\
**Created:** [August 5, 2017, 6:12am UTC](https://community.auth0.com/t/including-email-in-token-obtained-through-pkce/7760 "2017-08-05T06:12:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobby](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@bobby](https://community.auth0.com/u/bobby)\
**Post date:** [August 5, 2017, 6:12am UTC](https://community.auth0.com/t/including-email-in-token-obtained-through-pkce/7760/1 "2017-08-05T06:12:44Z")

</div>

I’m _almost_ successful in getting the PKCE Auth Flow to work - I can do everything including the code exchange.

The problem is that I have no “email” or “email\_verified” in my access token, even though I asked for it with `scope=email profile`.

Any idea what might be doing wrong? Is there some configuration I need to do to allow APIs to have access to the user info?

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [August 7, 2017, 5:33pm UTC](https://community.auth0.com/t/including-email-in-token-obtained-through-pkce/7760/2 "2017-08-07T17:33:43Z")

</div>

Based solely on the information you provided (aka without actually trying it for myself) **I would say that the likely cause of the situation is that you’re not including the `openid` scope**.

Both the `email` and `profile` scopes are associated with OpenID Connect (OIDC) specification and signal that you want to have access to associated user information. However, a request that wants to have OIDC behavior should signal that by including the `openid` scope, otherwise, the exact response behavior is unspecified.

You should try using `scope=openid email profile`.

---

<div class="post-metadata">

**Author:** ![bobby](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@bobby](https://community.auth0.com/u/bobby)\
**Post date:** [August 15, 2017, 2:04am UTC](https://community.auth0.com/t/including-email-in-token-obtained-through-pkce/7760/3 "2017-08-15T02:04:58Z")

</div>

I just saw that your answer - thank you very much! That indeed was the problem!

---

<div class="post-metadata">

**Author:** ![bobby](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@bobby](https://community.auth0.com/u/bobby)\
**Post date:** [August 15, 2017, 2:04am UTC](https://community.auth0.com/t/including-email-in-token-obtained-through-pkce/7760/4 "2017-08-15T02:04:58Z")

</div>

I just saw that your answer - thank you very much! That indeed was the problem!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:55am UTC](https://community.auth0.com/t/including-email-in-token-obtained-through-pkce/7760/5 "2018-03-02T05:55:47Z")

</div>


