I have serious issues using Bearer tokens with N8N. When I make calls to the APIs with Postman it works great and even with Zapier and Make.com it works. For some reason N8N does something different.
I have tried using Header Auth with Authorization Bearer in the name and then value in the token but nothing works. My token field is always a password field and I have the feeling this is an issue in N8N.
I also ignored Header Auth and uses sending headers but I have exactly the same problem.
Sharing the workflow does not make sense, I only test the http node.
What are you connecting to and is there any more information in the error you see? It sounds like the token you are using needs to be refreshed at some point but without more details I am not sure.
We connect to a specific supplier API (cannot provide access) and it works great with Postman. Refreshing is for sure not the issue, we know the mechanism and it works in all other tools and we use the correct token for 100%.
I tested with Postman, Make.com, Zapier and Activepieces and it all works.
Maybe there is an issue with GET and tokens? Using the same API but another method and Post does seem to work. Not by using Header Auth but using Sending headers. With GET it always fails.
I’m using “Authorization” as name and then paste in Bearer in the value field which basically shows as a password field. My feeling says something is wrong there.
Typically if it works once it should always work but if the token never changes it is a bit odd. I have done some testing with sending an Authorization header to webhook.site to see if we are sending the correct data and it looks to be fine.
Which version of n8n are you using at the moment as I know we changed the version of Axios we use and there could be something odd becuase of that.
Overall it does not seem to be an issue with the API but something in the combination of N8N and the Gravitee APi. Tested several other tools and it all worked.
My problem is I cannot share API details, the supplier does not allow me and this is very secure data.
You can check the request by sending it to something like webhook.site which will show you the headers we are sending. I have not yet found an API that we will work with for a few requests then stop.
Unless there is more information we can get hold of it is hard to say what is going on. Is Gravitee the system you are connecting to with the API or does that have another role in this?