Basic Authentication for JIRA-Python no longer works for REST API calls. What next?
Since using password is already deprecated in basic auth, API tokens are to be used in its place (as you've stumbled upon). In your code you need to use email in place of username and apiToken instead of password. In your code it should be # jira = JIRA(server, basic_auth = (my_JIRA_username, my_JIRA_pass)) jira = JIRA(server, basic_auth = (email, apiToken)) Try it out and do tell us how it goes.
Since using password is already deprecated in basic auth, API tokens are to be used in its place (as you've stumbled upon). In your code you need to use email in place of username and apiToken instead of password. In your code it should be # jira = JIRA(server, basicauth = (myJIRAusername, myJIRApass)) jira = JIRA(server, basicauth = (email, apiToken)) Try it out and do tell us how it goes.
Context: Stack Overflow question (score 2, has accepted answer): In Python, I used to be able to authenticate with JIRA over REST using a simple bit of code: from jira import JIRA myJIRAusername = 'myname' myJIRApass = 'mypassword' server = {'server': 'https://mysite.atlassian.net'} jira = JIRA(server, basicauth = (myJIRAusername, myJIRApass)) And then be able to do something simple like: myissue = jira.issue('MYISSUE-1') print myissue.key But JIRA has changed things, and I am guessing no longer allows basic authentication like this via the REST API. Instead I get a 401 error. I tired creating an API token, as suggested here: https://confluence.atlassian.com/cloud/api-tokens-938839638.html except I have NO idea where to use it (it doesn't work if I just use it as a password, like in the code above). I looked into OAuth as an alternative bu
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.