Hi there!
Is there any way to pass multiple authorization keys in API requests? I’ve tried searching but couldn’t find any useful information at once. Maybe there were something similar but I couldn’t distinguish it in the lines of code
So here’s the issue: my endpoint has both basic and oauth at the same time. I’ve tried setting them in headers
but the issue still remains.
The server responds with “401” error as basic auth hasn’t been passed. Could anyone please advise how to solve the issue?
Thanks in advance!
Hi @arlem, thank you so much for your response! Yes, I’ve tried that as well. The thing is when I’m using both of them, the Auth headers generated by Postman automatically (temporary ones) overwrite those that I set manually in the headers so in such case, unfortunately, I can use only Oauth based on your example.
Looking at the screenshot you posted in the first message, were you trying coma-separated value? It seems to be the recommendation according to that StackOverflow answer.
If this doesn’t work, could you detail a bit more what’s your use-case? That should make it easier for us to find a solution.
Thanks, @arlem! You’re totally correct: I’ve been using just spaces between authorizations. Setting them comma-separated solves the issue. Thank you so much for your help!
Hi @pxzxz,
Unfortunately, it’s all quite server-dependent. If your application accepts multiple auth headers, it’ll work for you. In my case, it worked, however, when I tried the same with many other applications, it worked from time to time, not as frequently as I wanted.
If it doesn’t work, most likely you’ll need to whitelist your IP in your server configuration to bypass basic auth or to pass username&password in the request URL with the following structure: http://username:[email protected]/
What application exactly do you call? Is it a widely known one?
Hope this helps you!