# Cannot Create JWT Bearer Token due to Unexpected Error

**URL:** <https://community.shiphero.com/t/cannot-create-jwt-bearer-token-due-to-unexpected-error/844>\
**Category:** GraphQL API\
**Created:** [September 25, 2020, 9:04pm UTC](https://community.shiphero.com/t/cannot-create-jwt-bearer-token-due-to-unexpected-error/844 "2020-09-25T21:04:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![achempak](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@achempak](https://community.shiphero.com/u/achempak)\
**Post date:** [September 25, 2020, 9:04pm UTC](https://community.shiphero.com/t/cannot-create-jwt-bearer-token-due-to-unexpected-error/844/1 "2020-09-25T21:04:45Z")

</div>

Hello, I am following these directions ([https://developer.shiphero.com/getting-started/#authentication](https://developer.shiphero.com/getting-started/#authentication)) to generate the necessary tokens to access the Shiphero api. Unfortunately, I get this message back when I attempt to do so:

`{"message": "Unexpected error. Please contact a system administrator."}`

I’m unsure why this error is occurring.

---

<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:** [September 25, 2020, 9:51pm UTC](https://community.shiphero.com/t/cannot-create-jwt-bearer-token-due-to-unexpected-error/844/2 "2020-09-25T21:51:06Z")

</div>

Hi @achempak!  
Are you using this same email to make the request? are you using Postman to generate the token?  
Also, have you changed your credentials lately?

Thanks in advance!  
Tom

---

<div class="post-metadata">

**Author:** ![achempak](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@achempak](https://community.shiphero.com/u/achempak)\
**Post date:** [September 25, 2020, 10:09pm UTC](https://community.shiphero.com/t/cannot-create-jwt-bearer-token-due-to-unexpected-error/844/3 "2020-09-25T22:09:10Z")

</div>

Hi @tomasw!  
I’m using the same email to make the request. I’m using the terminal directly to generate the token using  
`curl -X POST -H "Content-Type: application/json" -d \ {"username": "myemail", \ "password": "mypassword" } \ "https://public-api.shiphero.com/auth/token" `  
Also I just changed my password a few hours back. Could that be the issue?

---

<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:** [September 28, 2020, 12:28pm UTC](https://community.shiphero.com/t/cannot-create-jwt-bearer-token-due-to-unexpected-error/844/4 "2020-09-28T12:28:42Z")

</div>

Hi @achempak!  
In that case, could you try by using the old password instead and let me know if that works?  
Thanks in advance!  
Tom

---

<div class="post-metadata">

**Author:** ![achempak](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@achempak](https://community.shiphero.com/u/achempak)\
**Post date:** [September 29, 2020, 7:09am UTC](https://community.shiphero.com/t/cannot-create-jwt-bearer-token-due-to-unexpected-error/844/5 "2020-09-29T07:09:21Z")

</div>

Hi @tomasw!

Thanks for the reply. It works now. I guess it just took a while for the password change to come into effect!

---

<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:** [September 29, 2020, 12:34pm UTC](https://community.shiphero.com/t/cannot-create-jwt-bearer-token-due-to-unexpected-error/844/6 "2020-09-29T12:34:40Z")

</div>

Great, thanks for confirming that @achempak!  
It is possible, we have an engineer working on optimizing that process because it might take a while to update, causing this kind of delay.  
Thanks again!  
Tom
