Custom node - get header response for auth


i am working on a custom node. First i have to login by Basic-Auth, after i have to use, from response a header element (‘X-ACCESS-TOKEN’), for further queries. i didnt find a node wich are using this authentication method.

with the examples on, i only have this:

            const options: OptionsWithUri = {
                headers: {
                    'Accept': 'application/json',
                method: 'POST',
                uri: ``,
                auth: {
                	username: `${username}`,
                	password: `${password}`
                json: true,

            responseData = await this.helpers.request(options);

The responseData doesnt include the header information, right?
i try it with

return responseData.headers.get(‘X-ACCESS-TOKEN’);

But no success. Thanks.

Hi @ChristianV

You will need to add:
resolveWithFullResponse: true,
to your Options.
After adding this, the complete response is returned which also includes the headers.

Yes, i tryed this, but i get the following error:

Object literal may only specify known properties, and ‘resolveWithFullResponse’ does not exist in type ‘OptionsWithUri’.


You are correct, sorry. You will need to add

See the Ocilion node for an example :wink: :


no comment, i didn’t check that myself, that here is the same principle. :roll_eyes: :man_facepalming: thanks for your answer!