Generating the API Key using Postman
Getting Started
To begin, make sure that you have Postman installed. Open Postman and navigate to the Collections tab on the left-hand side.
Click the New button.
A new window will pop up asking you which type of connection you want to make. Select the HTTP option.
Obtaining a Bearer Token
In the dropdown menu to the left of the text field, select the POST option.
In the text field, enter the IP address followed by the port number 5000.
Click Send. The image below provides an exmaple of what this may look like.
Navigate to the Body tab and select raw. Enter the following lines of code:
{
"grant_type": "client_credentials",
"auth_id": "LocalAdmin",
"auth_secret": "DefaultSecret"
}
Note: Your Postman should now look like the following:
Lastly, click Send. You will then get the bearer token displayed at the bottom of the Postman app.
You can now obtain and register the API key, which is permanent.
Obtaining the API Key
Copy the access token that was obtained during the previous steps. For this example, the following is copied:
Ps1XYvR/B9nEGYxpyGuLiIhQ9ceL1+nPiilG4Pc8xP8=
Under the URL, replace /token with /registerApiKey. In this case, the URL will look like the following:
http://10.22.74.129:5000/v3/auth/registerApiKey
Navigate to the Authorization tab. In the Auth Type dropdown menu, select OAuth 2.0.
On the right-hand side, paste the bearer token previously obtained under Available Tokens.
Click Send. On the bottom of the Postman app, you will locate your API key.