Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • Jira OAuth 2.0 (3LO) access token getting expired within 10 minutes (returns 401 Unauthorized)

Jira OAuth 2.0 (3LO) access token getting expired within 10 minutes (returns 401 Unauthorized)

gopal guna November 4, 2025

Hi Team,

I’m working on some automation using Jira Cloud REST APIs with OAuth 2.0 (3LO) authentication.
My integration performs various site-level operations like creating issues, updating project settings, issue type schemes, workflows, etc via Jira Rest APIs

The flow I’m following is:

  • Generate an access token and refresh token using the OAuth authorization code flow.
  • Use the access token for REST API calls.
  • When the access token expires, I use the refresh token to generate a new pair of access token and refresh token and update the old refresh token with the new refresh token as it got expired within 10 minutes.

However, I’ve noticed that sometimes the access token gets expired or becomes invalid within just 10 minutes, even though its exp field indicates a validity of 1 hour.
After that, any API calls start failing with 401 Unauthorized.

I wanted to understand:

  1. Does Jira Cloud intentionally expire or revoke access tokens earlier than their expected lifetime?
  2. Can this happen if a new refresh token is generated somewhere else (causing the previous access token to become invalid)?
  3. Is there any specific recommendation to handle this scenario gracefully in automation workflows?

Would appreciate any insights or confirmation from others who’ve faced similar behavior.

Thanks,
Gopal G

1 answer

0 votes
Sunny Ape
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 4, 2025

Hello @gopal guna 

Does Jira Cloud intentionally expire or revoke access tokens earlier than their expected lifetime?

Nope.

Can this happen if a new refresh token is generated somewhere else (causing the previous access token to become invalid)?

Yep

Is there any specific recommendation to handle this scenario gracefully in automation workflows?

Don't refresh the same OAuth token in multiple or concurrent workflows.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events