Libraries and tools for interacting with your Samsara integration.Documentation Index
Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Official Samsara SDKs for Python, .NET, TypeScript, Java, Go, and other languages to accelerate your integration.
Libraries and tools for interacting with your Samsara integration.Documentation Index
Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
pip install samsara-api
from samsara import Samsara
# Initialize the client with your API token
client = Samsara(
token="YOUR_TOKEN",
)
# Get your organization information
org_info = client.organization_info.get_organization_info()
print(f"Organization: {org_info.data.name}")
# List all vehicles in your fleet
vehicles = client.vehicles.list()
for vehicle in vehicles:
print(f"Vehicle: {vehicle.name} (ID: {vehicle.id})")
# Get specific vehicle details
vehicle = client.vehicles.get(id="YOUR_VEHICLE_ID")
print(f"Vehicle VIN: {vehicle.data.vin}")
dotnet add package Samsara.Net
using Samsara.Net.Addresses;
using Samsara.Net;
var client = new SamsaraClient();
await client.Addresses.CreateAsync(
new CreateAddressRequest
{
FormattedAddress = "350 Rhode Island St, San Francisco, CA",
Geofence = new CreateAddressRequestGeofence(),
Name = "Samsara HQ",
}
);
npm install @samsarahq/samsara
import { SamsaraClient } from "@samsarahq/samsara";
const client = new SamsaraClient({ token: "YOUR_TOKEN" });
const response = await client.vehicles.list();
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
const page = await client.vehicles.list();
while (page.hasNextPage()) {
page = page.getNextPage();
}
dependencies {
implementation 'com.samsara:samsara-java-sdk'
}
package com.example.usage;
import com.samsara.api.SamsaraApiClient;
import com.samsara.api.resources.vehicles.requests.ListVehiclesRequest;
public class Example {
public static void main(String[] args) {
SamsaraApiClient client = SamsaraApiClient
.builder()
.token("<token>")
.build();
client.vehicles().list(
ListVehiclesRequest
.builder()
.build()
);
}
}