Autheticate Jira Cloud using REST API

Jamshaid
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.
December 13, 2022

I am trying to authenticate to Jira Cloud using Rest API and want to make a GET request to issues from my application.

  • When I make a GET request using Basic Auth it says:

Basic authentication with passwords is deprecated. For more information, see: https://developer.atlassian.com/cloud/confluence/deprecation-notice-basic-auth/ with 401 unauthorized error

  • When I use the API key, it says: 
"Issue does not exist or you do not have permission to see it." with a 404 error.
I have tested the link to the issue and it exists on the cloud.
I also tried creating an App in the Developer Console but it does not work as it returns an HTML page to allow access to the application.
as.png
The app can't open the browser as it will be running on a cloud. 
Is there any way I could authenticate to Jira Cloud and do a GET request?

2 answers

1 accepted

1 vote
Answer accepted
Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 13, 2022

Hi @Jamshaid  Just for your information, if you are not aware. 

You can use Basic Auth in POSTMAN. Instead of password using API token which you generated from your Atlassian account. 

Similar post :- https://community.atlassian.com/t5/Jira-Software-questions/Which-Auth-method-works-in-POSTMAN-rest-API-call/qaq-p/2214299

Thanks

V.Y

Jamshaid
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.
December 13, 2022

Hi @Vikrant Yadav 

Thanks for the info. I just had that figured out before your answer.

Thanks again.

Like Vikrant Yadav likes this
Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 13, 2022

You’re welcome ☺️ 

Like Jamshaid likes this
0 votes
Jamshaid
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.
December 13, 2022

This works when cookies are added to the POSTMAN request automatically somehow but not with the other methods

 

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