Skip to main content

1. Create or select an API token

You need an API-enabled Graviton account that is active and unexpired. Create or select an API token from the API tab in the user account administration dialog. Give the token only the permissions your integration requires. This quickstart needs account:read, objects:read, and tracking:read. See Authentication and access for every permission. Store the token in a server-side environment variable. Keep it out of browser code, mobile bundles, source control, and logs.

2. Confirm your account

A successful JSON response has success: true, your account under data, and a request identifier under meta.request_id.

3. List your vehicles

Read the objects in data. Use meta.pages to fetch subsequent pages. Keep object identifiers as strings.

4. Get a position

Replace DEMO_VEHICLE_01 with an imei returned by the previous request.
Inspect dt_tracker and dt_server before treating a stored position as current. A successful response does not mean the tracker is online now.

Python example

Install requests, then run this from your backend with GRAVITON_API_TOKEN set: