I’m trying to use n8n’s built-in OAuth2 credential (Grant Type: Client Credentials) with an HTTP Request node, but the API call appears to be sent without the Authorization: Bearer <access_token> header. I’m not sure how to confirm whether n8n is successfully fetching the token via the credential handler, or why the token isn’t being attached to the request.
What is the error message (if any)?
The request to the protected API endpoint returns an authentication/authorization failure (401/403). In the HTTP Request node’s execution details, I don’t see an authorization header being sent.
You’ll need to make sure the HTTP Request node is configured to use the OAuth2 credential correctly. Check the HTTP Request node’s settings to ensure the “Authentication” field is set to your OAuth2 credential. Also, in the “Headers” section, confirm that you haven’t accidentally overridden the Authorization header.
If that doesn’t work, verify that the OAuth2 credential itself is configured with the correct token URL and scopes. Sometimes a misconfiguration there can prevent the token from being retrieved properly.
I can get the token and make the call just fine in postman. I’ll double check everything again. When I go to the developer console the bearer token isn’t in the call to the api.
Is there a way to see the response the credential manager got from the oauth2/token call?
this api seems to want body per the documentation but when testing in postman it accepts it either way. I’ve tried it both through here. I’ve also check the developer console logs and it never passes the Bearer token in the header in the POST request.
I had this problem with an API i was working on. I couldnt get any response so i made a custom request for the token.
In my workflow i have two request, one to get the token and the other to call the URL
After this, I do the fetch and the return is in my case a json with the access token, there is also expiration and an empty key of refresh_token, so i guess is never used it
I hope this helps, if you have any questions or issues just say it and we can work around