Requests failing with error 401 "Unauthorized request"

Hello,

Yesterday (2019-07-30) I was able to process requests just fine, and today I ran the same query with the same credentials, and I’m receiving back an error that just says “{‘message’: ‘Unauthorized request’}” with an error code of 401.

Is anyone else seeing something like this? Any ideas how to resolve it?

Thanks,
Jeremy

@jeremyw looks like your token has expired. You can refresh it hitting / auth/refresh passing your refresh token as explained in the docs https://developer.shiphero.com/getting-started/

Ah. Thanks, @seba. How long do I typically have before I have to refresh the token? Also, do I have to wait until my current token expires, or can I refresh it ahead of time?

@jeremyw usually a month. And yes you can refresh before that time (the old one will still be valid though until it expires)

2 Likes