Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Cannot send get request to jira

Edited

I'm building flask application and trying to send get request to JSM cloud from it; however, I got this error message:  "Client must be authenticated to access this resource.","status-code": 401. Here's my code:

    jiraurl =  request.args.get('jiraurl')
    usrname =  request.args.get('usrname')
    pwd = request.args.get('pwd') #API_token
    url = "https://" + jiraurl +"/rest/servicedeskapi/servicedesk"
    auth = HTTPBasicAuth(usrname, pwd)
    headers = {
    "Accept": "application/json"
    }

    response = requests.request(
        "GET",
        url,
        headers=headers,
        auth=auth
    )

    print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))

1 answer

1 accepted

2 votes
Answer accepted
Sebastian Krzewiński
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 30, 2023

Hi @Kannpitcha Paponphatsiri !

 

Please check this answer - https://community.atlassian.com/t5/Jira-questions/ERROR-quot-message-quot-quot-Client-must-be-authenticated-to/qaq-p/1076087

Looks like you need to add header or switch to api tokens.

 

Regards,

Seba

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events