# Caching M2M token in Actions

**URL:** <https://community.auth0.com/t/caching-m2m-token-in-actions/123247>\
**Category:** Get Help\
**Tags:** actions-management-api, management-api\
**Created:** [December 17, 2023, 10:31pm UTC](https://community.auth0.com/t/caching-m2m-token-in-actions/123247 "2023-12-17T22:31:27Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [December 19, 2023, 7:28pm UTC](https://community.auth0.com/t/caching-m2m-token-in-actions/123247/3 "2023-12-19T19:28:36Z")

</div>

Hi @tea.veljkovikj,

Welcome to the Auth0 Community!

I understand that you are trying to cache your M2M tokens in Actions.

Firstly, if you have exceeded your monthly M2M quota, you could be limited from issuing new M2M access tokens. In this case, I recommend reaching out to our direct support channel on [support.auth0.com](http://support.auth0.com) to see if they can help with your quota utilization.

> [@tea.veljkovikj](#):
>
> Is the access token created in the Action is the same token that is issued to the application performing the Client Credentials flow?

Nope, they are considered different access tokens. Only the access token in the Action can be cached and used in future Action scripts.

> [@tea.veljkovikj](#):
>
> When caching anything it says that the cache can persist upto 15 minutes, however when I re-run my the flow the cache is always empty and returns a undefined value, the only time when I can access the cache is during the execution of the action or from another action, but in the same execution flow. So, my question is does the cache only work within the same flow?

If you are testing using the Actions built-in debugger interface, you will experience this issue where the cached items do not persist for up to 15 minutes. For cached items to persist, you must initiate the respective flow. For example, you must make a client credentials request for the cached items to be persist. Subsequent client credential requests will persist the cache items for up to 15 minutes.

Reference:

- [Caching M2M access token in Actions - #4 by rueben.tiow](https://community.auth0.com/t/caching-m2m-access-token-in-actions/100734/4)

Please let me know if you have any further questions.

Thanks,  
Rueben

---

_[View the full topic](https://community.auth0.com/t/caching-m2m-token-in-actions/123247)._
