← Blog / · #tools · 3 min read

Common Postman Tips

Learn common Postman tips including global token setup, collection token configuration, and automatic API execution features.
toc Table of Contents (2)
Common Postman Tips

1. Global Token Setup

1. Get Token During Login

Get Token

// Get the response data from the login API
var jsondata=pm.response.json();
// Check if login was successful
if (jsondata.code === 200) {
    // Get token and set it to the environment variable token
    var token=jsondata.data.token
    pm.globals.set("token",token)
} else {
    console.error(jsondata.msg);
}

2. Set Token in Collection

Set Token

2. Automatic API Execution

Run Collection

Right-click on the Collection and select “Run Collection”;

Select the APIs to execute, fill in the number of iterations and delay time on the right, then click “Run test automatic execution”.

Frency

Frency

· @psephopaiktes

Backend engineer, building indie SaaS tools and digital gardens in public.