I was trying to pass the API key from a function:
msg.headers = {};
msg.headers['Authorization'] = "Bearer "+ msg.payload.token;
return msg;
I keep on getting 401 error.
But when I copied the entire API key to the http request node > Token field it works without problem.
What seems to be the problem here?