I have a script that had been working just fine, until recently, I cannot get the agile endpoints to work anymore
Authorization code:
def Jira_Auth():
baseurl = "xxx.atlassian.net"
jira_api_username = "xxxxxxxx@xxxxxxx"
jira_api_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
auth = HTTPBasicAuth(jira_api_username, jira_api_token)
headers = {
"Accept": "application/json",
"Authorization": f"Bearer {auth}"
}
return baseurl,headers,auth
b,h,a = Jira_Auth()
print(b,h,a)
My request is:
def get_board_issues(boardId):
get_issues_url = f"https://{baseurl}/rest/agile/1.0/board/{boardId}/issue"
response = R.get(get_issues_url,headers=jira_headers,auth=auth) # store name and issuekeys
# issues = {}
# for i in response['issues']:
# issues[i['fields']['summary']] = i['key']
# issueNames = [x['fields']['summary'] for x in response['issues']]
# issuekeys = [x['key'] for x in response['issues']]
return response.text
issues = get_board_issues(633)
print(issues)
I get the error:
Client must be authenticated to access this resource.
I can get information from the V2 and V3 REST APIs just fine, but not these. My token is set to have the following scopes:
read:board-scope:jira-software
read:issue-details:jira
I appreciate any help.
Hi @Anna Woodard
I just tested this endpoint using a token with the same scopes and permissions, and it seems to be working as expected — so it doesn’t appear to be a general issue.
I’m using Basic Authentication, with the following header format:
headers = {
"Authorization": "Basic <Base64-encoded string of email:token>"
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.