Hello,
I am sure there is a fix I just cant find it
I know in Palladin you can use the HTTP retriever. How do I set the request header for authorization in Selenium.
Thank you
Hello,
I am sure there is a fix I just cant find it
I know in Palladin you can use the HTTP retriever. How do I set the request header for authorization in Selenium.
Thank you
Hi nxfxcom,
actually, thereâs nothing to find
Selenium resp. browsers do not have an API which would allow to add or alter HTTP headers. So this is technically not possible (directly).
Care to explain you scenario, and why youâd need to set headers?
Best,
Philipp
Thank you, fastest customer service ever 
I am trying to collect data from a XHR JSON API. To authenticate I have to send a request header with an authorization token. For some reason, I canât get it to work in the HTTP Retriever⌠needs to be in the browser.
Thanks for the details and the kind words 
I see two options:
The website from which you want to collect data, obviously requires a login (which then gets you a token which in turn is sent through the headers). You could add the login procedure to the Selenium workflow (i.e. filling login/password into a form, and submitting this). Thus you get the token and the headers will be sent when you access the JSON API.
I still think it should be possible with a âplainâ HTTP Retriever node if you set the proper headers, cookies, etc. What kind of error do you currently get? Would you by any chance be able to share an example or the URL so that I could have a look? (if this is not possible, I suggest to check to request within your browserâs dev tools and closely inspect the headers which are sent with the request).
Hope this helps â any further questions let me know!
âPhilipp
The API documentation should tell you what to send in the headers. It should tell you what the header key is (the token name for example), and what header value to pass (the token value, or something along with the token value)
Are you able to generate the token at all via the workflow? Or at least retrieve a token some other way, and manually add it as header in your request?
Your workflow should have 2 parts ideally:
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.