Unable to connect to JIRA from python using REST API
Error Message - You are not authenticated. Authentication required to perform this operation
Python code :
import json
import requests
import urllib3
urllib3.disable_warnings()
url = 'https://domainname.atlassian.net/rest/api/3/project'
data = {"key": "sangi","description": "Project_Monday","name": "learn_jira_sangi","projectTypeKey": "software","leadAccountId" : "5c7cb96ee6##########"}
data_json = json.dumps(data)
headers = {'Bearer': 'CfZP25G############', 'Content-Type':'application/json','Accept':'application/json'}
response = requests.post(url, data=data_json, headers=headers , verify=False)
resp=response.json()
print(resp)