Hello,
I have a device management solution (MDM). I want service requests to be created in Jira Service Management in response to critical incidents reported by my MDM.
I believe creating a service account would be the best course of action as using a service account credentials will ensure that the integration keeps working irrespective of user scopes/status.
I have created a service account, and I am trying to access the Jira Service Management APIs via the endpoint - https://[jsm].atlassian.net/rest/servicedeskapi authenticating via the API key for the service account.
However, all responses are 401 unauthorized. I am not sure what I am doing wrong, or if there is a better way to do this.
@Akash P ,
I'd suggest starting with the documentation, especially https://support.atlassian.com/user-management/docs/manage-api-tokens-for-service-accounts/
On the page you can see a note that the service accounts are a little different from regular accounts where as they need to call the api.atlassian.com endpoints instead of the instance specific ones.
You need to call the Atlassian API to use API tokens with scopes for Jira {{https://api.atlassian.com/ex/jira/{cloudId}}
or Confluence {{https://api.atlassian.com/ex/confluence/{cloudId}}.
How to construct a request to call the API
Jira public API |
Confluence public API |
---|---|
|
|
Beyond that, make sure to add the base64 encoded string of the service account email:token as an authorization header with basic authentication.
I see that I can maybe use Web Trigger for this.
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.