# Getting access tokens for multiple APIs w/o changing token URL?

**URL:** <https://community.postman.com/t/getting-access-tokens-for-multiple-apis-w-o-changing-token-url/17378>\
**Category:** Help Hub\
**Created:** [November 3, 2020, 6:26pm UTC](https://community.postman.com/t/getting-access-tokens-for-multiple-apis-w-o-changing-token-url/17378 "2020-11-03T18:26:28Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![allenheltondev](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/allenheltondev/32/31738_2.png) [@allenheltondev](https://community.postman.com/u/allenheltondev)\
**Post date:** [November 4, 2020, 12:43pm UTC](https://community.postman.com/t/getting-access-tokens-for-multiple-apis-w-o-changing-token-url/17378/3 "2020-11-04T12:43:01Z")

</div>

Welcome to the community, @wells.oliver !

You need to parameterize these values you’re using to do auth.

I’d recommend reading [this blog post](https://community.postman.com/t/medium-article-how-to-automate-oauth2-token-renewal-in-postman/6630) on how to automate Token Gen/Renewal.

To take that a step further, like in your use case, you will need to override the variables per folder. From within Postman, right click each folder and select **Edit**. Click on the **Pre-request Scripts** tab and add the following snippet - replacing the placeholder values with the specific url/password for the API.

```auto
pm.environment.set('Auth_Url', '<the auth url for this API>');
pm.environment.set('Basic_Auth', '<The login credentials for this API>');

```

This will automatically update the variables whenever requests in this folder runs. PLUS, if you add the script from the blog post, it will automatically generate and use an auth token 🙂

---

_[View the full topic](https://community.postman.com/t/getting-access-tokens-for-multiple-apis-w-o-changing-token-url/17378)._
