Quickstart
This guide gets you from API access to your first successful Livepin data call in a few minutes. You will generate credentials, create a bearer token, and fetch vehicle + latest location data.
Keep your API credentials server-side only. Do not expose tokens in browser code, mobile binaries, or public repositories.
1) Set your environment variables
Livepin collections use these environment variables:
export LIVEPIN_API_BASE_URL="https://api.livepin.in"
export LIVEPIN_API_KEY="<YOUR_API_KEY>"
export JWT_TOKEN="<YOUR_JWT_TOKEN>"
Set LIVEPIN_API_KEY to your API key and JWT_TOKEN to the JWT obtained from the authentication endpoint.
2) Access the Tracking Portal
Get your API credentials from the Livepin Access Tracking Portal:
Access Portal
https://app.livepin.in
3) Call your first protected endpoint
Every request requires both an API key header and a JWT bearer token.
List vehicles
curl "$LIVEPIN_API_BASE_URL/api/vehicles" \
-H "x-api-key: $LIVEPIN_API_KEY" \
-H "Authorization: Bearer $JWT_TOKEN"
4) Fetch latest locations
Latest locations
curl "$LIVEPIN_API_BASE_URL/api/vehicles/latest_locations" \
-H "x-api-key: $LIVEPIN_API_KEY" \
-H "Authorization: Bearer $JWT_TOKEN"
5) Add report retrieval
Most dashboards combine current location with one or more report endpoints.
KM report
curl "$LIVEPIN_API_BASE_URL/api/vehicles/reports/km-report" \
-H "x-api-key: $LIVEPIN_API_KEY" \
-H "Authorization: Bearer $JWT_TOKEN"
What's next?
You now have the minimum production-ready flow: authenticate, list vehicles, and fetch live coordinates.
