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.
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.
This message indicates that the connection between Postman and ZeroKey API was successfully established.
Generating a Bearer Token
Click the GET dropdown menu and select POST.
In the URL tab, enter the IP address of your ECD followed by :5000/v3/auth/token.
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:
Lastly, click the Send button.
Clicking Send will display the bearer token on the bottom of the Postman app.
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.