User personalization does’t seem to work now

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?

1 Like

As from yesterday, on my test instance I can’t execute any requests as User. I have set up app using production code, cleared data base. User personalization does’t seem to work now :exploding_head:

Anyone having similar problem lately?

Hi @maciej.dudziak,

My guess is that this is caused by a time synchronisation problem on the machine you are sending the request from.

Regards,
Dugald

1 Like