Hi Ian,
I am sorry, I couldn’t able to understand well with try-jira-ping add-on. Could you describe more with steps to get authorized for APIs invoking?
Basically, when I installed the first addon (try-jira-webhooks) and while running it, I observed that we are validating whether the event is having authorization header or not, and then generating some encoded token and validating it on every event request with signature, claims set. So my question is, whatever that encrypted token generated and validated during the event call, can that be used for invoking rest apis using request method by setting Authorization bearer token header value.
Something like as below -
request
.get('https://xxxxxx.atlassian.net/rest/api/2/issue/IT-xx.json', {
'Authorization': 'bearer ' + jwttoken
})
.on('response', function (response) {
}
Will that work? Is that token valid for accessing simple jira issue id details? is that the same token or is it something related only to addon? if that is case, how to generate a token and use that for accessing rest apis like for downloading secure attachments? by the way, when I tried with above script, I am getting unauthorized response. similarly I tried with below step to sendjwt token as param in url string. but no luck.
request
.get('https://xxxxxx.atlassian.net/rest/api/2/issue/IT-xx.json?jwt=' + jwttoken)
.on('response', function (response) {
}
appreciate if you could help on this regard.