# Refresh JWT tokens in React-Native using Api-Sauce

**URL:** <https://forum.codewithmosh.com/t/refresh-jwt-tokens-in-react-native-using-api-sauce/8584>\
**Category:** React Native\
**Created:** [November 18, 2021, 2:00am UTC](https://forum.codewithmosh.com/t/refresh-jwt-tokens-in-react-native-using-api-sauce/8584 "2021-11-18T02:00:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SohailAQ](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/sohailaq/32/2596_2.png) [@SohailAQ](https://forum.codewithmosh.com/u/SohailAQ)\
**Post date:** [November 18, 2021, 2:00am UTC](https://forum.codewithmosh.com/t/refresh-jwt-tokens-in-react-native-using-api-sauce/8584/1 "2021-11-18T02:00:35Z")

</div>

How to refresh token every 5 minutes using api-sauce. Anyone here has implemented that?

---

<div class="post-metadata">

**Author:** ![McCarty6](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@McCarty6](https://forum.codewithmosh.com/u/McCarty6)\
**Post date:** [November 24, 2021, 8:47pm UTC](https://forum.codewithmosh.com/t/refresh-jwt-tokens-in-react-native-using-api-sauce/8584/2 "2021-11-24T20:47:43Z")

</div>

After the _token_ expires, you’ll need to request a new _token using_ the _refresh token_ . Then, you need to _use_ the freshly retrieved _token_ for the next _API_ requests.

[MyMileStoneCard](https://www.mymilestonecard.run/)

---

<div class="post-metadata">

**Author:** ![SohailAQ](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/sohailaq/32/2596_2.png) [@SohailAQ](https://forum.codewithmosh.com/u/SohailAQ)\
**Post date:** [January 18, 2022, 3:33am UTC](https://forum.codewithmosh.com/t/refresh-jwt-tokens-in-react-native-using-api-sauce/8584/3 "2022-01-18T03:33:20Z")

</div>

If you wait till after “token expires” your API call will give you an error. You have to refresh your token before it expires.  
How do you request a new token? Can you please share your code snippet?
