# Can I access the JWT for a new user inside post-user-registration hook?

**URL:** <https://community.auth0.com/t/can-i-access-the-jwt-for-a-new-user-inside-post-user-registration-hook/6787>\
**Category:** Get Help\
**Tags:** webtask, hooks, authentication\
**Created:** [May 30, 2017, 2:18am UTC](https://community.auth0.com/t/can-i-access-the-jwt-for-a-new-user-inside-post-user-registration-hook/6787 "2017-05-30T02:18:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![brad1](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@brad1](https://community.auth0.com/u/brad1)\
**Post date:** [May 30, 2017, 2:18am UTC](https://community.auth0.com/t/can-i-access-the-jwt-for-a-new-user-inside-post-user-registration-hook/6787/1 "2017-05-30T02:18:35Z")

</div>

The flow is for a user to sign up (through an iOS app) to Auth0, then in a post-user-registration hook on Auth0, add that user’s info to a SQL database through an API route (that I built). However, I’d like to require token authentication on that route, and thus need the freshly created user’s token info to access the route. Is this possible? If not, there are a few other approaches I can think of. Or I’d be open to better recommendations for the signup structure in general.

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [May 30, 2017, 7:12am UTC](https://community.auth0.com/t/can-i-access-the-jwt-for-a-new-user-inside-post-user-registration-hook/6787/2 "2017-05-30T07:12:26Z")

</div>

The `id_token` is not available in the Hooks. If you would like to authenticate requests made from the Hook to your API, you can look into the [Client Credentials grant](https://auth0.com/docs/api-auth/grant/client-credentials). The Hook can be treated as a service, in which case the flow would be the same as any machine-to-machine flow, using our API auth features.

---

<div class="post-metadata">

**Author:** ![brad1](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@brad1](https://community.auth0.com/u/brad1)\
**Post date:** [May 30, 2017, 8:45pm UTC](https://community.auth0.com/t/can-i-access-the-jwt-for-a-new-user-inside-post-user-registration-hook/6787/3 "2017-05-30T20:45:14Z")

</div>

Thank you.

---

<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:54am UTC](https://community.auth0.com/t/can-i-access-the-jwt-for-a-new-user-inside-post-user-registration-hook/6787/4 "2018-03-02T05:54:11Z")

</div>


