Using the node.js atlassian connect express module (2.1.4) I do:
httpClient.get({
url: `/rest/api/2/screens`,
contentType: 'application/json',
json: true
}, (error, res, body) => {
this.handleErrors(error, body, resolve) || resolve(body);
});
which is working fine with other functions of my addon that need admin rights, but this one returns a 403 page. Why could that be? Can’t the plugin user access the screens?
It works with
url: `/rest/api/2/screens/{screenId}/tabs`,
that needs ADMIN scope set.
Further investigation: In Postman, if I call ‘/rest/api/2/screens’ with a bearer token of an admin user, then it returns
{
"errorMessages": [],
"errors": {}
}
the same as without authentication. Basic auth works fine. With ‘/rest/api/2/screens/{screenId}/tabs’ both auth methods work fine.