How to Create Optimized/Best script when similar types of request added with different Authorization(Token) value

Hi Team,
I need to run request based on the different token.As of now total 15 different types of tokens available for them.
Yes, I can create 15 requests with different types of tokens and it will run without any issue but Is there any other way where I can create only one request with the 15 different tokens?

P.S. I am using data driven approach through .csv file, Is there any way I can put those 15 tokens in the .csv file, call those token one by one and will create only one request with 15 iteration through collection runner?
If Yes, Then those iteration will work in newman?

Step to reproduce:

  1. Get the token from command prompt through certain commands.
  2. Open the Postman, Add this token into any selected environment variable.
  3. Go to the Headers section, Add Key as “Authorization” and value as “above variable name”
  4. Now run your request and verify the repsonse.
  5. Do same process for 15 other request with different token value and variable name and value.


Environment variables:

Request with authorization token

Still need more info, Please let me know.

You are on the right track. Use a CSV file or a JSON file to store your tokens and you an reuse the same request.

Here is the approach explained in a tutorial I did recently: