I'm trying to authenticate with the JIRA REST API in Python. Using Jira Cloud.
I generated a Jira API token.
Using the jira Python package, I tried:
jira = JIRA(JIRA_URL, auth=(username, token))
issue = jira.issue("CM-877")
and got "Login failed". I verified that 'username' and 'token' have the proper values.
I then tried something from the command line:
curl -D- -X GET -u mylogin@mydomain.com:TOKEN_VALUE -H "Content-Type: application/json" https://mydomain.atlassian.net/rest/api/issue/[issue name]
and I got "Basic authentication with passwords is deprecated".
I'm trying to follow the example at: https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/
Does someone have code that works?