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:password@example.com/
What application exactly do you call? Is it a widely known one?
Hope this helps you!