Hii I am new to Servicedesk API call, I have an admin access to my account
I need a serious help from all of you.
url : https://xxx.atlassian.net/rest/servicedeskapi/servicedesk/MFSD/customer
here : MFSD=> {serviceDeskId} [need to pass as a a parameter]
Method : :Post
Content type : Content-Type
Body :
{
"usernames": [
"joe",
"john",
"josh"
]
}
I am getting follwoing error :
401 :
{"errorMessage": "The action performed required a logged in user. Please log in and try again.","i18nErrorMessage": {"i18nKey": "sd.admin.servicedesk.error.authenticated.user.required","parameters": [],}
}
please help me to solve this problem.
Given the error message and the endpoint you are calling of POST /rest/servicedeskapi/customer, it certainly looks like your account is not authenticated via REST when making this specific call.
There are different authentication methods that can be used here. For utilities like this or something like curl, I would recommend using the Basic auth for REST APIs as a guide. I would expect that you would need to create an API token and follow the steps in that guide in order to build a string of username:api_token and then encode that string into the base64 as that guide explains. Once you do that, you can then supply some additional headers to the POST request in order to make sure your account is authenticated when making this kind of request.
Thank you, but one thing can you please confirm,
That I am using a free trial jira account with admin access.
So is atlassian jira allow me to accsea Rest API as a free trial admin user ? Or I need to purchase the jira version ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes the Atlassian Cloud site will still allow you to use the REST API, even if it is an evaluation trial. Should the trial expire, you could be locked out from the site itself, but this would manifest itself with the inability to login to the cloud site itself. If that happens, then the REST API access would also be expected to fail as it too depends on the user accounts ability to authenticate.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Andrew
Thank you very much, U made my day. Now I can able to access API , there was a authentication problem which I missed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Koushik Dey, So what was the problem?
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.