# How to get the idToken in post login action

**URL:** <https://community.auth0.com/t/how-to-get-the-idtoken-in-post-login-action/79659>\
**Category:** Get Help\
**Created:** [March 10, 2022, 1:38pm UTC](https://community.auth0.com/t/how-to-get-the-idtoken-in-post-login-action/79659 "2022-03-10T13:38:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dannylo.santo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dannylo.santo/32/34280_2.png) [@dannylo.santo](https://community.auth0.com/u/dannylo.santo)\
**Post date:** [March 10, 2022, 1:38pm UTC](https://community.auth0.com/t/how-to-get-the-idtoken-in-post-login-action/79659/1 "2022-03-10T13:38:52Z")

</div>

Within the postlogin action I need the user’s idtoken to make an external call to my system, is there this property in any object?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [March 10, 2022, 8:15pm UTC](https://community.auth0.com/t/how-to-get-the-idtoken-in-post-login-action/79659/3 "2022-03-10T20:15:23Z")

</div>

Hi there @dannylo.santo, welcome to the community!

Assuming there is an ID Token, you should be able to access it with `api.idToken` in the action. For reference, please see:

> **[Actions Triggers: post-login - API Object](https://auth0.com/docs/customize/actions/flows-and-triggers/login-flow/api-object)**
>
> Learn about the post-login Action trigger's API object.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![dannylo.santo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dannylo.santo/32/34280_2.png) [@dannylo.santo](https://community.auth0.com/u/dannylo.santo)\
**Post date:** [March 11, 2022, 1:20pm UTC](https://community.auth0.com/t/how-to-get-the-idtoken-in-post-login-action/79659/4 "2022-03-11T13:20:32Z")

</div>

Hey @ty.frith thanks for response.

But i never have a idToken during an execution of a post login action.

Is there any way to acquire this value during the execution of the action?  
I’m needing to use the token to make a query in my system

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [March 11, 2022, 10:53pm UTC](https://community.auth0.com/t/how-to-get-the-idtoken-in-post-login-action/79659/5 "2022-03-11T22:53:20Z")

</div>

No problem, happy to help where I can!

> [@dannylo.santo](#):
>
> But i never have a idToken during an execution of a post login action.

Are you using an app/authentication flow where you expect to have an ID Token at this point?

---

<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 26, 2022, 10:54pm UTC](https://community.auth0.com/t/how-to-get-the-idtoken-in-post-login-action/79659/6 "2022-03-26T22:54:01Z")

</div>

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