Info Center
Breadcrumbs

Establishing an API Connection and Obtaining a Bearer Token using Postman

Getting Started

To begin, make sure that you have Postman installed.

Open Postman and navigate to the Collection tab on the left-hand side. Then, click New. A window will open, asking you to choose which type of connection you want to make. Select the HTTP option.

image-20240711-185526.png


Making a Connection

Enter the IP address of the ECD followed by the port number :11000 in the field named Enter URL or paste text. Then, click the Send button. If the connection is successful, you will receive a message in the bottom right corner stating Status: 200 OK.

image-20240711-185659.png

This message indicates that the connection between Postman and ZeroKey API was successfully established.

Generating a Bearer Token

  1. Click the GET dropdown menu and select POST.

image-20240711-185806.png
  1. In the URL tab, enter the IP address of your ECD followed by :5000/v3/auth/token.

image-20240711-185942.png
  1. Navigate to the Body tab and select raw. Enter the following lines of codes in the Body tab:

{

    "grant_type": "client_credentials",

    "auth_id": "LocalAdmin",

    "auth_secret": "DefaultSecret"

}

Your Postman authentication should now look like the following:

image-20240711-190129.png
  1. Lastly, click the Send button.


Clicking Send will display the bearer token on the bottom of the Postman app.

image-20240711-190217.png

With a successfully generated bearer token, you can start sending GET commands to the ECD and obtain information such as Zone information, Anchor coordinates, and more.