Using Hiboo API with Postman
Set up Postman to efficiently test and explore the Hiboo API with automated authentication.
What You'll Achieve
By the end of this guide, you'll have:
A fully configured Postman collection with all Hiboo API endpoints
Automatic token management (no manual copy-paste)
Pre-configured environment variables
Working authentication flow
Alternative Tools: This guide focuses on Postman, but you can use similar tools like Insomnia or Hoppscotch with the same OpenAPI file.
Step 1: Download Required Files
Download our OpenAPI specification: openapiv2.yml
Install Postman: Download here or use the web version
Step 2: Import the API Collection
Open Postman and click "Import"
Upload the OpenAPI file and select "Postman Collection"
Verify import - You should see "Hiboo API" collection in your sidebar
Step 3: Configure Authentication Variables
Prepare your API Credentials, if you have no API credential, go to the Hiboo API, you will be able to define an
apiName
and anapiKey
will be generated.Open collection settings by clicking on your collection name → Variables tab
Create these three variables:
Variable NameInitial ValueCurrent ValueDescriptionx-access-token
(leave empty)
(leave empty)
Auto-updated after login
apiName
(leave empty)
your-api-name
Your API account name generated in 1.
apiKey
(leave empty)
your-api-key
Your API key generated in 1.
Security Note: Only set the "Current Value" for
apiName
andapiKey
. Be careful before setting "Initial Value" for sensitive data (See Postman documentation for more details).Save your variables
Step 4: Set Up Collection-Level Authentication
Go to Authorization tab in your collection settings
Select "API Key" and configure:
Key:
x-access-token
Value:
{{x-access-token}}
Add to:
Header
Step 5: Configure Automatic Login
Find the
/login
endpoint in your collectionSet up the request body with your variables:
{ "name": "{{apiName}}", "apiKey": "{{apiKey}}" }
Add the auto-token script in the Tests tab:
// Auto-update token after successful login if (pm.response.code === 200) { const responseData = pm.response.json(); pm.collectionVariables.set("x-access-token", responseData.token); console.log("Token updated successfully"); } else { console.log("Login failed:", pm.response.text()); }
Step 6: Test Your Setup
Execute the login request by clicking Send
Verify success - You should see a response like:
{ "id": 42, "email": "[email protected]", "admin": false, "firstName": "John", "lastName": "Doe", "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }
Check token was saved - Look in your collection variables;
x-access-token
should now have a valueTest an authenticated endpoint:
Open
/v2/fleet/equipments
Ensure Authorization is set to "Inherit auth from parent"
Click Send
Verify API response:
Last updated
Was this helpful?