400 Bad Request When validating access token using Marketplace REST API in Jira Cloud

Georgi Karaboichev November 6, 2019

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.

1 answer

0 votes
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 15, 2019

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events