Connect Samsara: bring fleet vehicle GPS into tracking
Generate an API Token in the Samsara Dashboard under Settings → API Tokens with fleet, vehicles and stats read access, paste it into Integration, pick the US or EU base URL for your region, test, map and activate — vehicle GPS then feeds TMS tracking.
The Samsara connector reads vehicle GPS from your Samsara fleet — for each vehicle, the GPS time, latitude and longitude, heading, speed and the place name looked up for that position — and turns those positions into tracking events in TMS, so a shipment in transit can be followed by vehicle. That is its only job: it reads vehicle locations only. It does not pull orders, does not create dispatches or loads, does not read driver logs or hours-of-service records, and does not write anything back to Samsara. One connection works with one Samsara API Token.
Prerequisites#
- A Samsara fleet account with vehicles that report GPS, and the vehicles you want to follow already set up in Samsara.
- Permission in the Samsara Dashboard to open Settings → API Tokens and generate a token. Generating a token is an admin-side task: if you cannot see that page, ask your Samsara admin to create the token for you.
- The token must be granted read access to fleet, vehicles and stats. A token generated without the stats read access cannot read the GPS stats this connection lives on, and the test and the reads will fail on permission.
- You know which region your Samsara account belongs to. US accounts use https://api.samsara.com; EU accounts use https://api.eu.samsara.com. The region decides base_url, and the wrong region will not answer for your fleet.
Get your credentials#
- Sign in to the Samsara Dashboard with an account that can manage API tokens, and open Settings → API Tokens.
- Generate a new API Token for this integration. While generating it, grant read access to fleet, vehicles and stats — all three, because the connection reads vehicle GPS from the fleet stats.
- Copy the token Samsara shows you, in full. It starts with samsara_api_ followed by a long string of characters. Copy it at generation time and keep it ready to paste — treat it like a password from this moment on.
- At the same time, confirm your region once more: US if your account is on the US side, EU if it is on the EU side. You will use that answer for base_url in the next step.
Fill it into Integration#
- Open Integration → Connector Marketplace → Samsara → New connection.
- api_token — required, API Token: paste the full token you generated in the Samsara Dashboard under Settings → API Tokens, starting with samsara_api_. It is a password-type field and is stored as a secret.
- base_url — optional, Base URL: this field is your region switch. Leave it empty, or fill https://api.samsara.com, for a US account. EU customers must fill https://api.eu.samsara.com instead — with a US address, an EU fleet will not answer.
Test the connection#
Click Test connection. With a token filled in, the test sends one real, read-only request: GET {base_url}/fleet/vehicles/stats?types=gps with your token as the Bearer credential, with a 12-second timeout. When it passes, the result confirms it in words: Bearer token authentication passed and the vehicle location endpoint is reachable. A 401 or 403 answer means the token was refused — it is wrong, no longer valid, or it is missing the read access the endpoint needs. A request that does not answer in time is reported as a timeout. Fix the cause, then test again: the test does not change any data in Samsara.
Mapping / pick a template#
Pick the Samsara standard mapping. It takes each vehicle GPS record — time, latitude and longitude, heading, speed and the place name for the position — and turns it into a TMS tracking event for that vehicle, so positions line up with the vehicle and shipment you follow in TMS. After the test passes, run one read and compare one vehicle that you know is on the road: check its latest position, heading and speed here against the same vehicle in Samsara. If they match, the mapping is right and you can activate.
Activate#
After activation, the connection reads vehicle GPS from Samsara through your token and keeps TMS tracking updated with the latest fleet positions, headings and speeds. Watch the first reads in Runs / Logs and compare a few vehicles with Samsara before leaving the connection unattended.
What this connection does not do: it does not pull orders or loads from Samsara, it does not create or change dispatches, it does not read driver logs, hours-of-service, camera or sensor records, and it does not send positions or any other data back to Samsara. Keep handling those jobs in Samsara itself or in the systems where that work happens.
FAQ#
Test fails with 401 — the token is refused
Samsara did not accept the value in api_token. The usual causes are on the value itself: it was pasted in part, an old token that is no longer valid was pasted, or a value that is not a Samsara API Token at all was pasted into the field.
Go to the Samsara Dashboard → Settings → API Tokens, generate a fresh token with read access to fleet, vehicles and stats, copy it in full — it starts with samsara_api_ — paste it into api_token, save, and test again.
Test fails with 403 — the token is missing read access
The token reached Samsara, but it is not allowed to read what the test asks for. This connection reads vehicle GPS from the fleet stats, so a token generated without read access to fleet, vehicles and stats is refused at this endpoint even though the token itself exists.
Generate a new token in the Samsara Dashboard → Settings → API Tokens and this time grant read access to fleet, vehicles and stats before you copy it. Paste the new token into api_token, save, and test again — editing the old token is not an option, its access was fixed when it was generated.
Test times out and never answers
The GPS stats request did not answer within 12 seconds. That is a reachability problem on the way to the Samsara API — most often a base_url pointing at the wrong region for your fleet, or a temporary Samsara API slowdown — not proof that the token is wrong.
Check base_url against your region first: https://api.samsara.com for US, https://api.eu.samsara.com for EU. Correct it if it points at the other region, then test again. If the timeout repeats with the right region, wait a short while and retry, and keep the failing time from Runs / Logs when you ask for help.
EU fleet: everything looks right, but the test still fails
The connection is still pointing at the US API address. base_url defaults to https://api.samsara.com, and an EU account does not answer there — the token and its access can be perfect and the EU fleet still will not respond on the US address.
Set base_url to https://api.eu.samsara.com, save, and test the same connection again with the same token — do not generate a new token or change anything else first.
Connected, but one vehicle shows no GPS
The connection returns the GPS Samsara has for the fleet: if Samsara itself has no current GPS for that vehicle — the vehicle is off, out of coverage, or not reporting — there is nothing for this system to show for it. A healthy connection cannot invent a position Samsara does not have.
Check that same vehicle in Samsara first. If Samsara shows a current position and this system does not, run a manual read, compare the vehicle in Runs / Logs, and test the connection again. If Samsara shows nothing either, fix the reporting on the Samsara side for that vehicle.
Why do no orders or dispatches come in through Samsara?
Because this connector only reads vehicle GPS locations. Orders, loads and dispatches are not part of what it can read from Samsara, so an empty order list here is expected behaviour, not a broken connection.
Keep creating and managing orders and dispatches in the systems where that work happens, and use this connection for what it does: following the vehicles that carry those shipments in TMS tracking, with position, heading and speed.