# Authentication : Refresh token

**URL:** https://community.shiphero.com/t/authentication-refresh-token/652
**Category:** Getting Started
**Created:** [August 11, 2020, 5:48pm UTC](https://community.shiphero.com/t/authentication-refresh-token/652 "2020-08-11T17:48:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kalesha](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@kalesha](https://community.shiphero.com/u/kalesha)
#### Post date: [August 11, 2020, 5:48pm UTC](https://community.shiphero.com/t/authentication-refresh-token/652/1 "2020-08-11T17:48:59Z")

</div>

Is there any alternative authentication to connect apis other than token based authentication?

My clinet doesnt want to update the token for every 30 days.

---

<div class="post-metadata">

### Author: ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)
#### Post date: [August 12, 2020, 1:47am UTC](https://community.shiphero.com/t/authentication-refresh-token/652/2 "2020-08-12T01:47:03Z")

</div>

Hi @kalesha  
Unfortunately the token will need to be renewed every 30 says using the refresh token. That task can be performed by the developer or automated as well so every 30 days you use the refresh token to get e new token without having to use the username + password.  
Let me know if this doesn’t help  
Thanks in advance!  
Tom

---

<div class="post-metadata">

### Author: ![kalesha](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@kalesha](https://community.shiphero.com/u/kalesha)
#### Post date: [August 12, 2020, 3:25am UTC](https://community.shiphero.com/t/authentication-refresh-token/652/3 "2020-08-12T03:25:47Z")

</div>

@tomasw thanks for the quick reply. So do we have an option to connect to shiphero using username + password instead of token?

---

<div class="post-metadata">

### Author: ![brett](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/brett/32/140_2.png) [@brett](https://community.shiphero.com/u/brett)
#### Post date: [August 12, 2020, 3:31am UTC](https://community.shiphero.com/t/authentication-refresh-token/652/4 "2020-08-12T03:31:12Z")

</div>

No, the GraphQL API only supports token authentication according to the documentation. Really the solution that is using the API should have a mechanism built in to cache both the refresh token and the current auth token.

To get around the “having to update the token every 30 days” you could adjust the workflow so that before it makes a request, it sends a new token request with the refresh token. This will ensure that you never need to store the auth token, and since the refresh token doesn’t change (unless you change the user in the system) there is no need to update anything.
