I am trying to use jira-python to connect to the JIRA rest api.
options = {'server': 'https://<site>.atlassian.net'}
jira = JIRA(options, basic_auth=('username', ' pass'))
Inside the constructor for the JIRA object it ties to make a call to https://<site>.atlassian.net/rest/api/2/serverInfo which gets an AUTHORIZATION_FAILED (401) response.
Any suggestions on what I might be missing?
Hello Michael,
I have obfuscated the URL you have provided in the comment above.
Regarding on the issue you are experiencing, could you please attempt on running the following:
from jira import JIRA options = { 'server': 'https://<site>.atlassian.net' } jira = JIRA(options,basic_auth=('USERNAME', 'PASSWORD')) # Get an issue. issue = jira.issue('JRA-1234') print "Project Key: " + issue.fields.project.key # 'JRA' print "Issue type name: " + issue.fields.issuetype.name # 'New Feature' print "Reporter: " + issue.fields.reporter.displayName
Can you successfully cURL:
curl -k -u USERNAME -H "Content-type: application/json" -H "Accept: application/json" -X GET https://<site>.atlassian.net/rest/api/2/serverInfo
The URL in question does not require user's authentication.
—
Kind regards,
Rafael P. Sperafico
Ended up being PEBKAC. Got in this morning and saw the typo in the password.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.