Error fetching projects: Unexpected response code: 401

Lavanya_harikumar August 13, 2019

Hi, 

I'm trying to import test cases via Zephyr test case importer jar for a Cloud project, I've provided all the required details (URL, username, password, Access key & secret key) and tried to connect. It is throwing me an error "Error fetching projects: Unexpected response code: 401". 

I've gone through few post and they have asked us to use /rest in the end of the URL. I tried even that, but its not working out. Also, I've tried to re-generate the keys and provided that. In User name field, tried both user name and email, both the combinations are throwing me the same error. 

URL: tried both https://myprojectsite.atlassian.net/rest & https://myprojectsite.atlassian.net/
User Name: tried both username & email

Can someone help me on this please ? 

Thanks, 
Lavanya 

1 comment

Comment

Log in or Sign up to comment
Warren
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.
August 13, 2019

Hi @Lavanya_harikumar 

I don't know anything about Zephyr, but I know that using the REST API requires people to use their Jira e-mail address and an API token (see this) or they get a 401 error - not sure if this will work for you

Lavanya_harikumar August 13, 2019

Hi @Warren ,

Thank you for sharing the info ! And it worked out for me :)

I did the below and am able to connect to the projects

1) Provide your URL with /rest 
2) User Name - Provide your email address
3) Password - Generate the API token via (https://id.atlassian.com/manage/api-tokens)
4) Provide the access & secret keys 

Click on connect, this will enable the projects drop down and all the projects will be displayed. 

The mistake that i did is, I was trying to use the portal password instead of API token. @Warren post has the details about this. 

Thanks,
Lavanya 


 

Sharon Griffiths October 29, 2019

Thanks much for putting the instructions.  This worked for us as well. 

 

Regards,

Sharon

TAGS
AUG Leaders

Atlassian Community Events