Forums

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

Error when connect Jira Server using Python

Tailin Song
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!
January 31, 2023

Hi, I was trying to access Jira in python and I tried to use PAT token for authentication but it failed.

Here is the error message

JIRAError: JiraError HTTP 401 url: https://jira.xxx.biz/rest/api/2/serverInfo
	text: Invalid IAP credentials: Unable to parse JWT
	
	response headers = {'Content-Length': '44', 'Content-Type': 'text/html; charset=UTF-8', 'X-Goog-IAP-Generated-Response': 'true', 'Date': 'Tue, 31 Jan 2023 11:56:10 GMT', 'Alt-Svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"'}
	response text = Invalid IAP credentials: Unable to parse JWT

and my codes

jira = JIRA(options={'server': 'https://jira.xxx.biz'}, token_auth=token)

 

1 answer

0 votes
Mohamed Benziane
Community Champion
January 31, 2023

Hi,

Welcome to the community

Can you try this:

jira = JIRA(options={'server': "https://xxxx.com/",'token_auth':"mytoken"})

Suggest an answer

Log in or Sign up to answer