# Getting access token & refresh token in actions

**URL:** <https://community.auth0.com/t/getting-access-token-refresh-token-in-actions/120848>\
**Category:** Get Help\
**Tags:** actions-management-api, management-api\
**Created:** [November 14, 2023, 8:22am UTC](https://community.auth0.com/t/getting-access-token-refresh-token-in-actions/120848 "2023-11-14T08:22:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![skumar27](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@skumar27](https://community.auth0.com/u/skumar27)\
**Post date:** [November 14, 2023, 8:22am UTC](https://community.auth0.com/t/getting-access-token-refresh-token-in-actions/120848/1 "2023-11-14T08:22:36Z")

</div>

Hi,  
We are trying to migrate from rules to actions. We want to get the **Access Token** and **Refresh token** for a **user** in an action.  
We got the access token via Auth0 Management API, but we can’t get the **refresh token** as we cannot enable **Offline Access** for Auth0 Management API.  
Please suggest how to get the refresh token. Do we need to create a custom API? If yes, how do we use it.

Regards,  
Sandeep

---

<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:** [November 14, 2023, 11:10pm UTC](https://community.auth0.com/t/getting-access-token-refresh-token-in-actions/120848/3 "2023-11-14T23:10:43Z")

</div>

Hey @skumar27 welcome to the community!

> [@skumar27](#):
>
> We are trying to migrate from rules to actions.

Is your rule able to achieve this functionality?

> [@skumar27](#):
>
> We want to get the **Access Token** and **Refresh token** for a **user** in an action.

While you can certainly enrich user tokens (ID and access) via an action, you can’t “get” them as they are minted once the Login Action completes.

> [@skumar27](#):
>
> Please suggest how to get the refresh token. Do we need to create a custom API? If yes, how do we use it.

Outside of the scope of actions, you can learn more about getting refresh tokens [here](https://auth0.com/docs/secure/tokens/refresh-tokens/get-refresh-tokens).

---

<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:** [November 28, 2023, 11:11pm UTC](https://community.auth0.com/t/getting-access-token-refresh-token-in-actions/120848/4 "2023-11-28T23:11:39Z")

</div>

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