# Multiple authorisation issue

**URL:** <https://community.postman.com/t/multiple-authorisation-issue/6479>\
**Category:** Help Hub\
**Tags:** authorization\
**Created:** [July 11, 2019, 2:27pm UTC](https://community.postman.com/t/multiple-authorisation-issue/6479 "2019-07-11T14:27:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anton\_IA](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@Anton\_IA](https://community.postman.com/u/Anton_IA)\
**Post date:** [July 11, 2019, 2:27pm UTC](https://community.postman.com/t/multiple-authorisation-issue/6479/1 "2019-07-11T14:27:03Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/c/c914209779b21022e553bdde105e9a7a1b7bd29d.png) 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!

---

<div class="post-metadata">

**Author:** ![arlem](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/arlem/32/3078_2.png) [@arlem](https://community.postman.com/u/arlem)\
**Post date:** [July 13, 2019, 10:25am UTC](https://community.postman.com/t/multiple-authorisation-issue/6479/2 "2019-07-13T10:25:05Z")

</div>

Hey @Anton_IA,

Have you tried using both the Authorization tab **and** the Headers tab to set-up your request?  
You could use the Authorization tab for OAuth as explained in [the documentation (learning.getpostman.com)](https://learning.getpostman.com/docs/postman/sending_api_requests/authorization/#oauth-10) and the Headers tab for the Basic Auth as [shown here (stackoverflow.com)](https://stackoverflow.com/a/32157792/2120297).

Let us know if that works!

---

<div class="post-metadata">

**Author:** ![Anton\_IA](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@Anton\_IA](https://community.postman.com/u/Anton_IA)\
**Post date:** [July 15, 2019, 3:55pm UTC](https://community.postman.com/t/multiple-authorisation-issue/6479/3 "2019-07-15T15:55:42Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/0/d/0d4bbf47dad92a84c93d859e13f25437d406e281.png)  
Do you happen to know any other solution?

---

<div class="post-metadata">

**Author:** ![arlem](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/arlem/32/3078_2.png) [@arlem](https://community.postman.com/u/arlem)\
**Post date:** [July 17, 2019, 8:24am UTC](https://community.postman.com/t/multiple-authorisation-issue/6479/4 "2019-07-17T08:24:59Z")

</div>

Hey,

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](https://stackoverflow.com/questions/29282578/multiple-http-authorization-headers).

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. 🙂

---

<div class="post-metadata">

**Author:** ![Anton\_IA](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@Anton\_IA](https://community.postman.com/u/Anton_IA)\
**Post date:** [July 17, 2019, 8:54am UTC](https://community.postman.com/t/multiple-authorisation-issue/6479/5 "2019-07-17T08:54:51Z")

</div>

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! 👍

---

<div class="post-metadata">

**Author:** ![kaustavdm](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/kaustavdm/32/1778_2.png) [@kaustavdm](https://community.postman.com/u/kaustavdm)\
**Post date:** [July 18, 2019, 8:08am UTC](https://community.postman.com/t/multiple-authorisation-issue/6479/6 "2019-07-18T08:08:09Z")

</div>

Hey @Anton_IA, If Arlemi’s answer solved your query can you please mark that answer a “Solution” for this thread?

---

<div class="post-metadata">

**Author:** ![pxzxz](https://avatars.discourse-cdn.com/v4/letter/p/5f9b8f/32.png) [@pxzxz](https://community.postman.com/u/pxzxz)\
**Post date:** [April 1, 2020, 8:39am UTC](https://community.postman.com/t/multiple-authorisation-issue/6479/7 "2020-04-01T08:39:45Z")

</div>

It does not work for me with comma-separated. Please help!

{  
“fault”: {  
“faultstring”: “Invalid Access Token”,  
“detail”: {  
“errorcode”: “keymanagement.service.invalid\_access\_token”  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![Anton\_IA](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@Anton\_IA](https://community.postman.com/u/Anton_IA)\
**Post date:** [April 1, 2020, 9:02am UTC](https://community.postman.com/t/multiple-authorisation-issue/6479/8 "2020-04-01T09:02:51Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![pxzxz](https://avatars.discourse-cdn.com/v4/letter/p/5f9b8f/32.png) [@pxzxz](https://community.postman.com/u/pxzxz)\
**Post date:** [April 1, 2020, 9:38am UTC](https://community.postman.com/t/multiple-authorisation-issue/6479/9 "2020-04-01T09:38:49Z")

</div>

Hello @Anton_IA ,  
I am running the API on Postman.  
I am sure that I do not need to whitelist my IP as I am able to get the response without OAuth2.
