I have used the on demand REST API to create a ticket on my Service Desk using an Agent Username and Password (Basic Authentication over HTTPS). When I try to create a ticket using the same method, the username and password authentication fail. Is there, or will there be the ability to use the REST API in On Demand to allow a "customer" to create a ticket?
Community moderators have prevented the ability to post new answers.
I was also getting 401 Unauthorized for any request to the Jira Service Desk Cloud API using a customer account with basic auth.
I've been able to work around it by using form-based login and then cookie based authentication with the resulting session ID.
This is undocumented/unsupported, so don't rely on it.
First logging in with the customer account credentials, which must be url-encoded:
curl -v 'https://your-domain.atlassian.net/servicedesk/customer/user/login'
-H 'Content-Type: application/x-www-form-urlencoded'
--data 'os_username=USERNAME&os_password=PASSWORD'
There should be a cookie returned in the response headers like this the login was successful:
< set-cookie: local.sd.session.key=your-session-id-here; Expires=Wed, 17-Jan-2018 03:33:37 GMT; Path=/; Secure
Then using the usual documented API call, except with a cookie header rather than Authorization header:
curl 'https://your-domain.atlassian.net/rest/servicedeskapi/request'
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-H 'cookie: local.sd.session.key=your-session-id-here'
--data <your request data here>
Since it is related. The below change has been implemented in the past few days:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is is currently not possible because of below bug:
https://jira.atlassian.com/browse/JSD-1473
Please review and watch above bug ticket.
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.