I am trying to use httpClient.asUserByAccountId in ACE
“scopes”: [
“read”,
“write”,
“delete”,
“project_admin”,
“admin”,
“ACT_AS_USER”
],
app.post('/protected/issue-created', addon.authenticate(), (req, res) => {
console.log(req.context.userAccountId);
const httpClient = addon.httpClient(req);
httpClient.asUserByAccountId(req.context.userAccountId)
.get('/rest/api/latest/issue/AP-1350', (err, result, body) => {
console.log(err);
console.log(result);
console.log(body);
});
res.sendStatus(204);
});
The result is:
{
error: ‘invalid_grant’,
error_description: ‘Expiration timestamp too far in the future [was 113 seconds from now; please set exp
to no more than 60 seconds after issue time]’
}
What am I missing?