# Manage oAuth2 and Cookies in a same collection

**URL:** <https://community.postman.com/t/manage-oauth2-and-cookies-in-a-same-collection/42781>\
**Category:** Help Hub\
**Tags:** collections, authentication\
**Created:** [January 11, 2023, 11:08am UTC](https://community.postman.com/t/manage-oauth2-and-cookies-in-a-same-collection/42781 "2023-01-11T11:08:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thegdz.net](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/thegdz.net/32/14422_2.png) [@thegdz.net](https://community.postman.com/u/thegdz.net)\
**Post date:** [January 11, 2023, 11:08am UTC](https://community.postman.com/t/manage-oauth2-and-cookies-in-a-same-collection/42781/1 "2023-01-11T11:08:47Z")

</div>

Hi.

For now we have 2 ways to access our APIs: oAuth (mobile) or cookies (web).

In Postman we have created 2 collections: one using oAuth and the other one using cookies.

 ![Capture d’écran 2023-01-11 à 11.40.57](https://us1.discourse-cdn.com/getpostman/original/3X/0/4/04a5c85e513d9a4c4b14b14c7d3759088818f07d.png)

So we have duplicate all APIs in both collections.

Is there a way to have only one collection capable to use oAuth or cookies on demand?

Many thanks for Your help.

---

<div class="post-metadata">

**Author:** ![Kurmavatar](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/kurmavatar/32/3026_2.png) [@Kurmavatar](https://community.postman.com/u/Kurmavatar)\
**Post date:** [February 6, 2023, 10:36am UTC](https://community.postman.com/t/manage-oauth2-and-cookies-in-a-same-collection/42781/2 "2023-02-06T10:36:35Z")

</div>

Hi @thegdz.net,

You should be able to use “Authorization” and “Cookies” at collection level to inherit the same for all requests in that collection.

More details are below:

- [Using cookies | Postman Learning Center](https://learning.postman.com/docs/sending-requests/cookies/#creating-cookies-programmatically)
- [Authorizing requests | Postman Learning Center](https://learning.postman.com/docs/sending-requests/authorization/#inheriting-authorization)

---

<div class="post-metadata">

**Author:** ![thegdz.net](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/thegdz.net/32/14422_2.png) [@thegdz.net](https://community.postman.com/u/thegdz.net)\
**Post date:** [February 6, 2023, 12:45pm UTC](https://community.postman.com/t/manage-oauth2-and-cookies-in-a-same-collection/42781/3 "2023-02-06T12:45:10Z")

</div>

Hi @Kurmavatar.

Many thanks again. Will have a look.
