How to use POSTMAN tool for testing WebAPI

This article is about testing WebAPI using Postman tool.It is one of the important topics in programmers world.Normally most of the programmers think about testing webapi using postman.They have lots of questions mind like "How to pass get request of webapi to postman tool" and in turn what they will receive i.e response. The postman tool consists of "Collections","APIS", "Environments" in the LEFT SIDE PANE.The right side pane is use to send or receive webapi request.
Collections: The user can create new collections for storing all the request APIs.

In the right side pane just click "+" symbol to create a new request

The programmers mostly use the below tabs to test WebAPI.


In simple terms, the payload is an information that you send and receive from the server.The body of your http request and response message.The payloads are identified using curly braces "{}".


For Eg:- This is the simple JSON payload which you are passing to server.Here emailid and password are passed through JSON payload and it will be look like the below one.


                <email"> '' </email">,
                <password"> 'xxxxx' <password">,

               {                                       {
                                "message": "Login Successful"

In the above example,The real payload is "Login Successful" and remaining thing such as data,status are overhead data.

Authorized way of using APIS:

Mostly clients wants their api to be authorized.For eg:- i have a product called usmtechworld.If any third party client needs to access my product then they need to get authorization from my product in the form of "accessToken".If the client has my accesstoken then only they can access my other APIs such as getproducts,getauthors etc from my resource API.
To get "Accesstoken" from my usmtechworld product, the client needs to send their credentials such as emailid,password,granttype and whatever other additional securities needed to access my resource api.

What are the things get passed in the Headers and Body of Get Request

Sample Access token API:

content-type: application/x-www-form-urlencoded
select "Raw" option and give following

and it will give response as


and you can send whatever extra parameter you need in response.