How to get ‘token’ for API ?

You can get token for API from two ways:

  1. First is when you will sigh up in to a website the  website will provide the ‘token’ via email or on same website in any section.
  2. API owner will proved you a some keys and their values that you have to fill in for x-www-form-urlencoded as followstoken

After that you have to go to Headers TAB and need to set headers as follows

how-to-set-headers-in-postman-tool

This request will be POST request and you will get a JSON response  that will look like.

json-response-token

Now you can fetch acces_token from JSON response and use it for further endpoints.

What is endpoint in API ?

postman

First of all we need an end point and Postman tool. That end point will look like http://www.abc.com/name . So name will call as an ‘end point’. By using ‘name’ end point at last in URL it will give the full detail of any person whose name will pass at the place of ‘name’ .

Suppose i will pass the name ‘xyz’ then i can get the full detail of xyz (if API was developed to provide full detail by using ‘name’ end point).