# Refresh token example

**URL:** <https://community.auth0.com/t/refresh-token-example/94895>\
**Category:** Get Help\
**Tags:** reusable-refresh-tokens, sessions\
**Created:** [November 22, 2022, 8:27am UTC](https://community.auth0.com/t/refresh-token-example/94895 "2022-11-22T08:27:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![carlos3](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/carlos3/32/33792_2.png) [@carlos3](https://community.auth0.com/u/carlos3)\
**Post date:** [November 22, 2022, 8:27am UTC](https://community.auth0.com/t/refresh-token-example/94895/1 "2022-11-22T08:27:32Z")

</div>

Hi, I´m new in all these auth0 things.  
I have an outdated token and want to call `oauth/token` but using refresh\_token options.

Which headers should be added to the request? Also, which attributes should be listed in the body of the request?  
I’ve been using just `content-type` for headers and next attributes for `body`:

- client\_id
- client\_secret
- audience
- grant\_type
- refresh\_token
- code

For now I have two paths that not sure which one should I follow:  
if `content-type` uses `application/json` I received next message  
 ![image](https://global.discourse-cdn.com/auth0/original/3X/3/7/37664f846ba9de86dc2eba32ec491e9b15369b9f.png)

On the other hand if `content-type` uses “application/x-www-form-urlencoded” next response is received  
 ![image](https://global.discourse-cdn.com/auth0/original/3X/2/6/26faea10310858e7b4e0ee0f86ea29271423de04.png)

Another question, how could I get a proper value for `code` in body?  
Thanks

---

<div class="post-metadata">

**Author:** ![ale.vesga1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ale.vesga1/32/60921_2.png) [@ale.vesga1](https://community.auth0.com/u/ale.vesga1)\
**Post date:** [December 13, 2024, 6:05am UTC](https://community.auth0.com/t/refresh-token-example/94895/3 "2024-12-13T06:05:48Z")

</div>

Our team is answering some of our frequently asked questions.

Currently, the Auth0 Management API refresh token endpoints are only available to Enterprise plan customers. To learn more, visit our [Pricing page](https://auth0.com/pricing).

Other methods for using tokens include token rotation and the SDK support for refresh tokens. See [Refresh Tokens](https://auth0.com/docs/secure/tokens/refresh-tokens).

Hope this helps!

---

<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:** [December 27, 2024, 6:06am UTC](https://community.auth0.com/t/refresh-token-example/94895/4 "2024-12-27T06:06:09Z")

</div>

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