REST API from connect app auth

Hello,

I’ve created a simple connect app. On install I get the auth details (auth is set to jwt). On webhook of issue updated, I want to access the rest api of /rest/api/2/issue/{my_issue} .

When trying to access I get the “Issue does not exist or you do not have permission to see it”.

I’m sure that I have some authentication issue, because from my browser (connected to Jira) I see the JSON just fine, but I’m not sure where I went wrong.

Based on this documentation(I can’t put the whole link): /cloud/jira/platform/jira-rest-api-basic-authentication/

My question is:

[A]: where do I find the username that I need to do this curl?

curl -D-
-u fred@your-doman.atlassian.net:freds_api_token
-X GET
-H “Content-Type: application/json” \ …

[B} the API token is generated via this: Bitbucket - but what is the secret? Is it the sharedSecret key from my JWT auth? or is it a different thing?

If you are writing a cloud app then don’t use basic auth, use this auth instead: Security for Jira Cloud apps

That will require you to generate a signed JWT token. We have frameworks and tools that can help with that depending on the language you are using.

1 Like