# Get email from payload in nestJS API

**URL:** <https://community.auth0.com/t/get-email-from-payload-in-nestjs-api/102600>\
**Category:** Get Help\
**Tags:** sdks-quickstarts, emails, express-oauth2-bearer, management-api\
**Created:** [March 15, 2023, 1:18pm UTC](https://community.auth0.com/t/get-email-from-payload-in-nestjs-api/102600 "2023-03-15T13:18:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rationem](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rationem/32/13366_2.png) [@rationem](https://community.auth0.com/u/rationem)\
**Post date:** [March 15, 2023, 1:18pm UTC](https://community.auth0.com/t/get-email-from-payload-in-nestjs-api/102600/1 "2023-03-15T13:18:11Z")

</div>

Hi,  
I am using express-oauth2-jwt-bearer to retrieve the auth details.

Is there an example of how to add the logged inn users email to the auth object.

Many thanks

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [March 15, 2023, 11:40pm UTC](https://community.auth0.com/t/get-email-from-payload-in-nestjs-api/102600/3 "2023-03-15T23:40:35Z")

</div>

Hi @rationem,

Thanks for reaching out to the Auth0 Community!

Yes, most definitely! You will need to append the user’s email address as a custom claim to the access token using a Post Login Action.

I recommend going over our FAQ below for more instructions:

[https://community.auth0.com/t/adding-custom-claims-to-tokens/84590](https://community.auth0.com/t/adding-custom-claims-to-tokens/84590)

Please let me know if you have any questions.

Thanks,  
Rueben

---

<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 29, 2023, 11:41pm UTC](https://community.auth0.com/t/get-email-from-payload-in-nestjs-api/102600/4 "2023-03-29T23:41:21Z")

</div>

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