Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,293,516
Community Members
 
Community Events
165
Community Groups

OAuth 2.0 Authorization Code Error

Abby Chou I'm New Here Jun 14, 2022

Hello! I'm trying to set up OAuth 2.0 for a script that makes calls to the Jira API. I'm running a local Jira Server instance at http://localhost:2990/jira, and using the Authorization Code flow on this page.

I set up my application link like this:

Application Link Screenshot.png

And got the credentials.

Credentials Screen Screenshot.png

Then I went into my browser and went to the following URL (encoding the redirect URI via an online tool, but I'm not sure if that step was necessary):

http://localhost:2990/jira/rest/oauth2/latest/authorize?client_id=65d4b12a43d6f9fe52a95ce5493e321e&redirect_uri=http%3A%2F%2Flocalhost%3A2990%2Fjira&response_type=code&scope=WRITE

If I understand correctly, this should take me to a screen where I can give permission for the client to use my Jira account. However, I get redirected to the following URL:

http://localhost:2990/jira/plugins/servlet/oauth2/consent?client_id=65d4b12a43d6f9fe52a95ce5493e321e&redirect_uri=http://localhost:2990/jira&response_type=code&scope=WRITE

And see the following screen:

Error Screen Screenshot.png

I also tried going through the same steps but using http://localhost:2990/jira/plugins/servlet/oauth2/consent as the redirect URI (both in the application link setup and in the query parameter for the URL I entered), but I got the same result.

This is my first time setting up OAuth, so I'm unfamiliar with how to implement it. Could someone help me understand what I'm doing wrong? 

Thank you very much!

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Jira Service Management

Jira Service Management Documentation Opportunities

Hello everyone, Hope everyone is safe! A few months ago we posted an article sharing all the new articles and documentation that we, the AMER Jira Service Management team created. As mentioned ...

192 views 0 5
Join discussion

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