# How To Request With Multiple URL Using The Same Token

**URL:** <https://community.postman.com/t/how-to-request-with-multiple-url-using-the-same-token/19646>\
**Category:** Help Hub\
**Created:** [January 28, 2021, 10:18am UTC](https://community.postman.com/t/how-to-request-with-multiple-url-using-the-same-token/19646 "2021-01-28T10:18:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![denisdav](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@denisdav](https://community.postman.com/u/denisdav)\
**Post date:** [January 28, 2021, 10:18am UTC](https://community.postman.com/t/how-to-request-with-multiple-url-using-the-same-token/19646/1 "2021-01-28T10:18:54Z")

</div>

Hi All,

I am a newbie and I am not a coder/developer, just learning.  
I have this task related to post API / postman.

The scenario as follows:

1. Run API to sign in and get the token
2. Edit the bearer token in a different API and run it (with that same token) for multiple URL

For eg. (after getting the token):  
POST {{url}}api/v1/add/page-01  
POST {{url}}api/v1/add/page-02  
POST {{url}}api/v1/add/page-03  
… …  
POST {{url}}api/v1/add/page-99

I’ve tried to make a collection runner with that many API, so I don’t have to do it manually and eyeball/monitors the result. But in the next day, I will get a new token so I’ve to edit all that request one by one and this is very time-consuming and a waste.

How to do this in a more automated way? Can you guide me?

Thank you in advance.

---

<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:** [January 28, 2021, 12:16pm UTC](https://community.postman.com/t/how-to-request-with-multiple-url-using-the-same-token/19646/2 "2021-01-28T12:16:10Z")

</div>

Hey @denisdav, welcome to the community!

You can reference this article below that automates usage and renewal of an OAuth2.0 token.

> [@Medium Article: How to Automate OAuth2 Token Renewal in Postman](https://community.postman.com/t/medium-article-how-to-automate-oauth2-token-renewal-in-postman/6630):
>
> Hey everyone, I have seen on a number of forums and stack overflow articles people expressing their frustration with the manual process Postman has for renewing OAuth2 tokens when they expire. I thought I would share a write up I did to help you get past the manual process and have your tokens renewing automatically. Let me know what you think!

---

<div class="post-metadata">

**Author:** ![bpricilla](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/bpricilla/32/6511_2.png) [@bpricilla](https://community.postman.com/u/bpricilla)\
**Post date:** [January 28, 2021, 12:19pm UTC](https://community.postman.com/t/how-to-request-with-multiple-url-using-the-same-token/19646/3 "2021-01-28T12:19:43Z")

</div>

@allenheltondev Even I was about to share the same article from my bookmarks 🙂 That’s life saver!!

@denisdav Please spare a min and similar issue is raised [here](https://community.postman.com/t/how-to-automatically-set-a-bearer-token-for-your-postman-requests/10126/6).

---

<div class="post-metadata">

**Author:** ![denisdav](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@denisdav](https://community.postman.com/u/denisdav)\
**Post date:** [January 28, 2021, 3:22pm UTC](https://community.postman.com/t/how-to-request-with-multiple-url-using-the-same-token/19646/4 "2021-01-28T15:22:55Z")

</div>

Hi @allenheltondev & @bpricilla, thank you for the guidance it helps related to the token.

And how to iterate the request for “x” amount times but with different URLs?  
(Should I start a new thread or can I continue in this one to ask about this?)

For eg, rather than I add one by one in my collection runner:  
POST {{url}}api/v1/add/page-01  
POST {{url}}api/v1/add/page-02  
POST {{url}}api/v1/add/page-03  
… …  
POST {{url}}api/v1/add/page-99

Can I just make something as a variable and iterate it 99x times?  
Using this as a base request: POST {{url}}api/v1/add/page-“xx”

Is this feasible? Sorry for such a noob question.

Much appreciated. 🙂

---

<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:** [January 29, 2021, 12:16pm UTC](https://community.postman.com/t/how-to-request-with-multiple-url-using-the-same-token/19646/5 "2021-01-29T12:16:10Z")

</div>

No worries @denisdav

I would recommend searching the forum for an answer on that. I’ve answered questions exactly like that maybe 10 times over the past year, they are out there and you won’t have to dig very hard 🙂

---

<div class="post-metadata">

**Author:** ![denisdav](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@denisdav](https://community.postman.com/u/denisdav)\
**Post date:** [February 1, 2021, 7:37am UTC](https://community.postman.com/t/how-to-request-with-multiple-url-using-the-same-token/19646/6 "2021-02-01T07:37:13Z")

</div>

Ok @allenheltondev, many thanks for the support. Cheers!

---

<div class="post-metadata">

**Author:** ![pranavdavar](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/pranavdavar/32/9152_2.png) [@pranavdavar](https://community.postman.com/u/pranavdavar)\
**Post date:** [February 1, 2021, 1:26pm UTC](https://community.postman.com/t/how-to-request-with-multiple-url-using-the-same-token/19646/7 "2021-02-01T13:26:29Z")

</div>

Hi @denisdav, you may use collection runner and have URL as a variable. For that variable, you can pass data from csv or json and can have that number of iterations.  
 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/e/1/e18592c14790e2bfeb61e0896491145e9e29f6dc.png)  
POST {{url}}api/v1/add/{{page}}

Sample json may look like

> {  
> “page”:[  
> “page-01”,  
> “page-02”,  
> “page-03”,  
> “page-04”  
> ]  
> }

---

<div class="post-metadata">

**Author:** ![denisdav](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@denisdav](https://community.postman.com/u/denisdav)\
**Post date:** [February 1, 2021, 6:03pm UTC](https://community.postman.com/t/how-to-request-with-multiple-url-using-the-same-token/19646/8 "2021-02-01T18:03:06Z")

</div>

thanks a lot @pranavdavar. this one completes my task. 🙂
