Originally, I was trying to automize Opsgenie alert linking to JSM incidents, following this guide: Auto Link Alerts to Jira Service Management Incide... - Atlassian Community
The final step kept failing because of an authentication issue, so I started troubleshooting it by trying a simple API call:
https://%company%.atlassian.net/rest/api/2/issue/%issue-key%
Authorization: Basic <base64 encoded api key>
Content-Type: application/json
I'm using Postman for this and put the values in the appropriate fields.
I followed the guide here for the authorization topic: https://developer.atlassian.com/cloud/jira/service-desk/basic-auth-for-rest-apis/#supply-basic-auth-headers
I created the API key with my user in the Atlassian Admin section and base64 encoded it using Powershell and the format myemail:apikey etc.
Still, I'm getting the error that either my supplied issue key doesn't exist or I'm not authenticated.
What am I missing?
Thanks!
Hi Marius, You need to use an API Token instead of an API Key when using the Jira api.
You can generate one here: https://id.atlassian.com/manage-profile/security/api-tokens and then encode that and try again.
Cheers,Patrick TripodiGLiNTECH
Hi Patrick
That did the trick! Thanks!
Best Regards
Marius
It looks like you're new here. Sign in or register to get started.