Hi All, please help. I tried everything still getting 401 unauthorized error in python. Below is my code.
url = 'https://jira.mycompanyname.org/rest/api/2/issue/XYZ-85'
server = 'https://jira.mycompanyname.org'
headers = {
'Accept':'application/json',
'Content-Type':'application/json',
'Authorization': 'Basic [base64 encoded string of my office email id:auth token]'
}
options = {
'server':sever
}
query = {
'jql':'project=XYZ'
}
response = requests.get(url,headers=headers,params=query)
print(response.text)
Please help. I am exhausted trying every page on this community and you tube videos, nothing is working 
PS can this be because our company uses OKTA to login into apps?
however NOTE - when I am opening below URL in my browser its showing all information
'https://jira.mycompanyname.org/rest/api/2/issue/XYZ-85
Many thanks