What links should I be using to use Oauth with JIRA Software (cloud)?

Andrew Webb April 27, 2021

This seems to be an obvious question but I have been unable to find the answer

All the documentation I have read points to localhost:8900 but I don't think that is right.

I have assumed that the links should be :

 

requestTokenUrl: "https://mysite.atlassian.net/jira/plugins/servlet/oauth/request-token",

authorizeUrl: "https://mysite.atlassian.net/jira/plugins/servlet/oauth/authorize",

accessTokenUrl: "https://mysite.atlassian.net/jira/plugins/servlet/oauth/access-token"

 

When I call my Oauth plugin it simply comes back with a 404: Page not found error.

What am I missing?

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 27, 2021

What documentation are you following?  

I ask because you mention using localhost:8900 which is, as far as I know, never mentioned in the docs - 8900 is not a port any Atlassian software uses, and localhost is always going to be Server, never a Cloud system.

Andrew Webb April 27, 2021

Hi Nic,

This is the page I am trying to use:

https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-oauth-authentication/

It is the example app.py Python code downloaded from the site:

 

consumer_key = 'oauth-sample-consumer'

consumer_secret = 'dont_care'

 

request_token_url = 'http://localhost:8090/jira/plugins/servlet/oauth/request-token'

access_token_url = 'http://localhost:8090/jira/plugins/servlet/oauth/access-token'

authorize_url = 'http://localhost:8090/jira/plugins/servlet/oauth/authorize'

 

My problem is that I cannot find any definitive reference to the real URLs I should be using.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 27, 2021

Ah, I see, sorry.  The sample code you've downloaded contains local links.

I think you need to run through https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps/ - this tells you how to generate tokens from a Cloud system

Andrew Webb April 28, 2021

Hi Nic,

Thank you for that documentation. I have followed that and I think I have got further but I seem to have fallen at what is hopefully the final hurdle.

Screenshot 2021-04-28 at 21.03.22.pngScreenshot 2021-04-28 at 20.59.22.png

As far as I can tell I have provided a valid scope.

I have set the following permissions:

Screenshot 2021-04-28 at 21.09.49.png

Do you know what I am missing?

Suggest an answer

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

Atlassian Community Events