I want to integrate JSD (Jira Service Desk ) Rest Apis to my code.
Where I want to
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"}'
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.