Forums

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

I've been getting Unauthorized (401) since 17/06/2019

projectoverview June 19, 2019

I've been getting Unauthorized (401) since 17/06/2019 when trying to run my rest api script in python.

I think it's due to the new authentication policy.

 

What is the equivalent of this line of code (the old method):

jira = JIRA({'server': "https://xxxx.atlassian.net/"}, basic_auth=("user@name.com", "password"))

in the 'api token' authentication method?

I've tried:

jira = requests.get('https://xxxxx.atlassian.net/', auth=('User@name.com', 'API_TOKEN'))

But I'm getting: 

AttributeError: 'Response' object has no attribute 'projects'

in: 

projects = jira.projects()

 

1 answer

0 votes
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.
June 19, 2019

Hi @projectoverview 

Your authentication should still be basic_auth, hopefully it is as simple as that

projectoverview June 25, 2019

It didn't work

Suggest an answer

Log in or Sign up to answer