Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Jira OAuth-403-Forbidden

I want to integrate third party application into jira using OAuth 2.0(3LO).And I have retrieved Access token and cloud id.With the above values I tried to retrieve list of projects, but I am getting 403 Forbidden error and my code is 

URL url = new URL("");
HttpURLConnection http1 = (HttpURLConnection) url.openConnection();
http1.setRequestProperty("Authorization","Bearer <access_token>");
http1.setRequestProperty("Content-Type", "application/json");
http1.setRequestProperty("Accept", "application/json");

And I also I want to know,I have to use the same access token which was created by using this second point(Exchange authorization code for access token) of this link:

Could anyone help me to solve this?

1 answer

0 votes


Thanks for sharing what and how you're wanting to do with your app integration. The 403 error is most likely caused by your token being invalid or expired. Within the OAuth article you referenced it states:

  • 403 Forbidden with {"error": "invalid_grant", "error_description": "Unknown or invalid refresh token.": This error is returned when the user's Atlassian account password has been changed. Change the password back to the original password or initiate the entire authorization flow from the beginning again.

I would be interested to see the full 403 error you're getting back to understand where your authorization is failing and why (Possibly related to the type of Token you've generated).

Additionally, the token you're generating and wanting to use is only available to make API calls, such as listed here Make calls to the API using the access token.

Stephen Sifers

Suggest an answer

Log in or Sign up to answer
Site Admin

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you