Hi,
I’m trying to get accountId
of the current user in my Dynamic Content Macro, but always get response:
401 - Expecting claim 'qsh' to have value '...' but instead it has the value '...'
Here is my code:
app.get("/team-member", addon.authenticate(), async function(req, res) {
let userKey = req.query["user_key"];
const httpClient = addon.httpClient(req);
let reqUrl = `${baseUrl}/wiki/rest/api/user/?key=${userKey}`;
httpClient.get(reqUrl, function(err, response, contents) {
if (err || (response.statusCode < 200 || response.statusCode > 299)) {
console.log(err);
res.send(response.body);
} else {
...
}
});
I also tried to use an endpoint /wiki/rest/api/user/current
but the result is same.
Other REST API endpoints work fine (or at least ‘content’ does).
Scope READ
is set in ‘atlassian-connect.json’.
Any experience with this issue, please?
Thanks for your time and reply,
Jiri