asUserByAccountId() throws error against Confluence Cloud

I have a piece of code that looks something like:

        let httpClient = addon.httpClient(req).asUserByAccountId(req.context.userAccountId);

        httpClient.get({
                url: '/rest/api/content/XXXX',
                headers: {
                    'X-Atlassian-Token': 'nocheck'
                },
            },
            function (err, resp, body) {
            if (err) {
                // ERR
            } else {
                // SUCCESS
            }
        });

Despite having ACT_AS_USER in the scope, and I can see that there is a valid User Account ID and Client ID in the request context, I keep getting:

error TypeError: Cannot read property 'access_token' of undefined
    at /node_modules/atlassian-connect-express/lib/internal/host-request.js:183:59

I can’t figure out if this is an ACE problem or rejection by the host.

Hi @wsdan,

Are you still experiencing this issue:

Why do you add :

This will allow your request to opt out of token checking. I don’t think you need to add this if you’re GETting a content. Refer to https://developer.atlassian.com/cloud/confluence/rest/ for endpoints where you can add that in the header, like POSTing an attachment.

Cheers,
Anne