I am trying to validate an access token using Marketplace API in JIRA Cloud for my App. I tried using Postman and "request" library, but the REST is returning 400 "Bad Request" in both cases with empty body.
I have followed the examples here: https://developer.atlassian.com/platform/marketplace/rest/#api-addons-addonKey-tokens-token-post
I am able to create, get or delete access tokens using REST, but I am not able to validate one. My app is on the marketplace as private app and there I can see that access tokens that I have created exist.
I have the following code(I have replaced <example.addon.key> and <token> with correct values):
var options = {
method: "POST",
url: "https://marketplace.atlassian.com/rest/2/addons/<example.addon.key>/tokens/<token>"
}
request(options, function (error, response, body) {
if (error) {
throw new Error(error);
}
console.log('Response: ' + response.statusCode + ' ' + response.statusMessage);
console.log(body);
});
I can't understand why its returning 400, any help would be appreciated.
Hi @Georgi Karaboichev ,
This is not be the best place to get help/support on this. You may want to refer to the below resources instead:
I hope this helps.
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.