JIRA API Issues python

Stefan Thiem July 8, 2022

I'm trying to use the REST API to python to export issues. To get access to Jira, I have to connect to the Server first with login data (USER1, PASSWORD1). This python code works fine:

from atlassian import Jira

jira = Jira(
url='https://xxx',
username='USER1',
password='PASSWORD1'
)

 

However, to get access to JIRA, I have additional login data (USER2, PASSWORD2), so that I cannot retrieve information (e.g. jira.issue('XXX') as I do not have any permission to do so. Is there an easy solution to this problem or respectively to put both login data in the Jira command?

1 answer

0 votes
Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 8, 2022

Hi @Stefan Thiem I never used Python API but can you try to prepare two authenticatino objects?

jiraUser1 = Jira(
url='https://xxx',
username='USER1',
password='PASSWORD1'
)
jiraUser2 = Jira(
url='https://xxx',
username='USER2',
password='PASSWORD2'
)

 and simply try to use jiraUser2 if the jiraUser1 has problems with permissions?

Stefan Thiem July 11, 2022

Hi @Martin Bayer _MoroSystems_ s_r_o__  thx for your reply. Unfortuanley, this does not work for both. This is the error for jiraUser2

HTTPError: 401 Client Error: Unauthorized for url:

Suggest an answer

Log in or Sign up to answer