Open In App

How to Use API Keys authentication in Postman

Last Updated : 14 Dec, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Postman is an API(application programming interface) development tool that helps to build, test and modify APIs.  In this tutorial, we will see how to use API Keys authentication in Postman.

The API key is a unique identifier that authenticates requests and if several users are there, their username or email id can be joined with the current date and a secure code meant only for that project by using the md5 mechanism, we can create API Key and can maintain in a database.

Steps to Use API Keys authentication in Postman

Step 1: After downloading and installing the Postman, open the software. Add a new Collection and give it a name like “GFG”. Here, we can see, multiple tabs like Authorization, Pre-request scripts, Tests, and Variables.

postman2

Step 2: When you hover, on the name of your collection, 3 dots will appear. Click on those 3 dots, and then click on “Add new request”

z159

Step 3: You need to select “GET/POST/PUT/DELETE etc” request from the dropdown down menu as per requirement and click on “Authorization” Tab as shown below.

Example: In this example, we are selecting “GET”

z185

Step 4: Now in the right-side pane, we need to enter key and value as shown

key: x-api-key
value: API Key associated with your account.

z186

You can get API key associated with your account by creating an account on this website

https://api-ninjas.com/api/emoji

Step 5: Now You can simply paste the API in the space provided and click on Send. Output will be shown in the body with the status code; 200 (OK).

API USED

https://api.api-ninjas.com/v1/emoji?name=slightly smiling face

Note: To call this API: we need to provide API Key :

Output

Recording-2023-12-14-at-012113


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads