You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hello Members,
i'm trying following CURL and getting. Please suggest
{"message":"Client must be authenticated to access this resource.","status-code":401}
###
curl --request GET \
--url 'https://domain.atlassian.net/rest/servicedeskapi/request/10026' \
--header 'Authorization: Bearer <access token>' \
--header 'Accept: application/json'
After lot of troubleshooting have following API working
1. To GET Access code
hi @Ravi Chaganti
Exactly. Glad it worked for you.
If you think my answer was helpful, thanks to mark it as accepted, so it would help other users looking for similar functionality.
Cheers,
Karim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For Outh 2.0 you will need to enable and configure it through the developer console to create application access with some extra steps to enable your client.
The steps are well explained in the below link
Setting and Configuring OAuth 2.0 (3LO) apps
Cheers,
Karim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for taking time and responding @Karim ABO HASHISH
I've configured per instructions mentioned above and trying the CURL command.
I'm getting Access Token for below CURL command
i'm trying to create an issue. I'm looking for correct end-point for
curl --request POST \
--url 'https://api.atlassian.com/ex/jira/{cloud id}/rest/api/3/issue/' \
--header 'Authorization: Bearer <Access code>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"fields": {
"summary": "JL - Test",
"issuetype": {
"id": "10008"
},
"project": {
"id": "10002"
},
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "This is the description.",
"type": "text"
}
]
}
]
}
}
}'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi @Ravi Chaganti
You need to use basic authentication and create an API token using this link to use it as your password.
Example below using CURL
curl -D- -u $NAME:$PASSWORD -X GET -H "Content-Type: application/json" https://domain.atlassian.net/rest/servicedeskapi/request/10026
Another Example using Postman
Good Luck and let us know how it went for you
Cheers,
Karim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Karim for reply.
i'm working with OAuth enabled REST API as part of organization's requirement.
This was the reason i'm sending Bearer and Access code in Header.
Any suggestion on OAuth enabled REST API will help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.