The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to get issues list via REST API using Basic Auth

Sergiy Lavryk
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 24, 2019

I need to import issues into our internal CRM system, so I'm playing with Jira REST API using PAW.

Unfortunately I can't get anything :(

Any help is appreciated.

(Maybe it's because I'm on trial plan right now)

jira1.pngjira11.pngjira12.png

Same using CURL

jira2_1.jpg

Please help! :)

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Aleksandr Zuevich
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 Champions.
July 25, 2019

Hi @Sergiy Lavryk ,

Do you see any issues when you're at Issues and filters - All issues?

Capture.PNG

Sergiy Lavryk
July 25, 2019

Yep. And I can see JSON with data if I put that search url into browser where I logged in.

Aleksandr Zuevich
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 Champions.
July 25, 2019

Hmmm...

It seems that it is due to authorization method...

I tried this endpoint without any authorization and it returns 200 instead of expected 401.

Do you use API token?

Sergiy Lavryk
July 25, 2019

Yes, it’s on screenshot.

Aleksandr Zuevich
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 Champions.
July 25, 2019

@Sergiy Lavryk , please double check your email here https://id.atlassian.com/manage-profile/email and token from here https://id.atlassian.com/manage/api-tokens.

I've just reproduced your behavior in postman with Basic Auth. When I input correct email to Username and copied API token to Password it becomes to work correctly:

Capture.PNG

Like Sergiy Lavryk likes this
Sergiy Lavryk
July 25, 2019

Well, I did twice :( and if I use wrong token - API gives me error

Sergiy Lavryk
July 25, 2019

You was right! There is some VERY weird relation between id and actual jira site... By some reason I have two accounts, but maybe was logged in into different ones at these two sites.

all set, thanks