# Refresh Token request returning 401 Unauthorized

**URL:** https://community.shiphero.com/t/refresh-token-request-returning-401-unauthorized/1553
**Category:** GraphQL API
**Created:** [September 14, 2021, 7:23pm UTC](https://community.shiphero.com/t/refresh-token-request-returning-401-unauthorized/1553 "2021-09-14T19:23:26Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![statonjm](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@statonjm](https://community.shiphero.com/u/statonjm)
#### Post date: [September 14, 2021, 7:23pm UTC](https://community.shiphero.com/t/refresh-token-request-returning-401-unauthorized/1553/1 "2021-09-14T19:23:26Z")

</div>

We have been using GraphQL ShipHero workflow everyday for the last 2 years.  
Everyday, the workflow is automatically ran, and the first step is to refresh the token.

However, today the refresh token request failed, with a 401 Unauthorized error. I don’t believe the token is expired yet, as it just refreshed yesterday. I have attempted to refresh a handful of times, but with the same response. Can anybody shed some light on why this failed?

---

<div class="post-metadata">

### Author: ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)
#### Post date: [September 15, 2021, 2:23pm UTC](https://community.shiphero.com/t/refresh-token-request-returning-401-unauthorized/1553/2 "2021-09-15T14:23:37Z")

</div>

Hi @statonjm, I spoke with engineering and you may have to create a new token.

---

<div class="post-metadata">

### Author: ![statonjm](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@statonjm](https://community.shiphero.com/u/statonjm)
#### Post date: [September 15, 2021, 2:56pm UTC](https://community.shiphero.com/t/refresh-token-request-returning-401-unauthorized/1553/3 "2021-09-15T14:56:07Z")

</div>

Thanks, I created a new token and it seems to work now! 😀  
Just wondering - is this something that we have to do every year or two? Anything I can plan for?  
or was this just a one off situation, which shouldn’t happen normally?

---

<div class="post-metadata">

### Author: ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)
#### Post date: [September 15, 2021, 3:18pm UTC](https://community.shiphero.com/t/refresh-token-request-returning-401-unauthorized/1553/4 "2021-09-15T15:18:15Z")

</div>

Good to hear. This seems to be a one-off situation. The refresh does not expire, and this should not happen again. If, however, it does create a new token and it will get you rolling again.

---

<div class="post-metadata">

### Author: ![statonjm](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@statonjm](https://community.shiphero.com/u/statonjm)
#### Post date: [September 15, 2021, 3:29pm UTC](https://community.shiphero.com/t/refresh-token-request-returning-401-unauthorized/1553/5 "2021-09-15T15:29:18Z")

</div>

I will keep this in mind moving forward, thank you!

---

<div class="post-metadata">

### Author: ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)
#### Post date: [September 16, 2021, 3:38pm UTC](https://community.shiphero.com/t/refresh-token-request-returning-401-unauthorized/1553/6 "2021-09-16T15:38:16Z")

</div>


