Generating a Postman API key

Profile picture for user arilio666

When working with APIs, we may have to gain access to prove our identity to the specific API, so API keys are used.
It is to gain access to the APIs with secure authorization from our point.

So in this article, let us see how we can generate our API key in postman and set it as an environmental variable for our ease.

Let us dive in!!

We are going to generate an API key tied to our Postman account.

Step 1: Go to this rocket icon -> account settings. It will redirect to the site and take you to this page.

  •  
  • Click on API keys.

Step 2: Click on generate API key.

Step 3: Name the API key.

You should see your API key generated like this with the name you just entered for it. Now let us set the API key we just generated in our environment.

Setting API key as an environmental variable

Step 4: Now copy your generated key.

Step 5: Go back to postman application and open manage environment.

Step 6: Click on this eye icon and click add on environment place.

Step 7: Add the variable name and paste the copied API key and paste it in the initial value just as we did, and this way, we don't have to remember our key every time and can use this variable.

It is better to set it as an environment variable for its use in multiple API requests.