Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Jira Service Desk Api not working with Basic Authentication Edited

I want to integrate JSD (Jira Service Desk ) Rest Apis to my code.

Where I want to

  1. create customer,
  2. create organisation 
  3. add them to organisation and couple of more thing....needed to perform

 

I want to call JSD Rest Api's using Basic Authentication which required email:api_token

 

I passed all the information but still its that same message - 

`Basic authentication with passwords is deprecated. For more information, see: https://confluence.atlassian.com/cloud/deprecation-of-basic-authentication-with-passwords-for-jira-and-confluence-apis-972355348.html
`

 

Please let me know how to fix it.

 

My CURL Call:

curl --location --request POST 'https://xxxxx.atlassian.net/rest/servicedeskapi/customer' \--header 'Accept: application/json' \--header 'Content-Type: application/json' \--header 'Authorization: Basic xxxxx==' \--header 'Cookie: atlassian.xsrf.token=xxxxx' \--data-raw '{ "email": "xxxx.xxxxxx@xxxxxxxxxx.com", "fullName": "Fred F. User"}'

 

1 answer

0 votes

Hello @Neha Sachan,

Welcome to Atlassian Community!

When it comes to authentication for Jira Service Management Cloud API, it uses the same authentication method as Jira Cloud as mentioned in the documentation below:

Here in Community, we help mostly with the basics of API, since there is a specific Community for development questions.

I tested the endpoints you mentioned and it works when using email address + API token (created in https://id.atlassian.com/manage-profile/security/api-tokens).

//create customer
curl --request POST \
--url 'https://domain.atlassian.net/rest/servicedeskapi/customer' \
--user 'user@domain.com:TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"displayName": "Fred F. User",
"email": "fred@example.com"
}'

//create organization
curl --request POST \
--url 'https://domain.atlassian.net/rest/servicedeskapi/organization' \
--user 'user@domain.com:TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"name": "Charlie Cakes Franchises"
}'


//add customer to organization
curl --request POST \
--url 'https://domain.atlassian.net/rest/servicedeskapi/organization/ORG-ID/user' \
--user 'user@domain.com:TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"accountIds": [
"qm:a6671b47-cde7-4f90-g405-14356hijk417:25lm81no-320p-4qr7-st8u-9v7w2x87y223"
],
"usernames": []
}'

Since your question is related to development, if the documentation I mentioned doesn’t help, please, reach out to our developer community at https://community.developer.atlassian.com/.

Kind regards,
Angélica

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
Community showcase
Asked in Jira Service Management

JSM June ask me anything (AMA)

Hello Community members! We’re wrapping up the end of JSM June with an Ask Me Anything (AMA) with the Jira Service Management product team. This is your chance to ask all your ITSM questions to o...

391 views 21 14
View question

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you