OAuth rotating tokens: Intermittent Failures

Hello!

I am having an intermittent issue with the rotating tokens. Every once in a while my requests to get a new token will start giving me a 401 with this error:

{
    "error": "invalid_grant",
    "error_description": "Unknown or invalid refresh token."
}

These are the query parameters I am sending:

grant_type=refresh_token
refresh_token = My Refresh Token
client_id = My Client Id
client_secret = My Client Secret

Basically I am doing this:

  1. Make a request.
  2. If I get a 401 I go refresh the token.
  3. Make the request again.

It looks like the last refresh token I receive before the failures start is invalid before I even get it, I have noticed others posting about just not getting a refresh token at all but
Is there anything I can do to ensure my tokens are valid or see why they are not valid? We have a 15 minute job that polls data from JIRA so it would never hit the 30 day expiration for the refresh token itself.

Thanks for any help you can provide!

@AlexHofer,

Between the title with “intermittent failures” and the nature of authorization, I think this will be best handled as a developer support ticket. My hunch is that we will need your client_id, some x-trace-id headers, and maybe some timestamps from failures to help narrow down the problem in our logs.

Sounds good, thank you! I will open a ticket!