I'm trying to connect to an API using 'auth' in the options. Currently it looks like this:
var options = {
hostname: '<name of site>',
port: 443,
path: '<path>',
auth:'Bearer <Token>',
method: 'GET'
};
However, I get Status Code 403 if I execute the request. When I put the following URL in the browser, it works:
https://<Host Name+ Path>?authorization=Bearer%20<Token>
I've already tried to change auth into Authorization=Bearer <Token>
and Authorisation:Bearer <Token>
but it didn't changed anything.
I'm probably just setting up the authorisation part not correctly, but couldn't find any info how auth
works
Thanks in advance
403 Missing authorization
With my code I had403 Invalid authorisation
Sadly didn't helped me – Shamanism