ANSWERED
ANSWERED

Webhook url header

Hello, in the Webhook description I see that paragraph describing the Webhook header: Example Webhook Notification Example webhook event (see Webhook Reference for full details): POST /webhook-handler HTTP/1.1 Host: your-app.com User-Agent: Samsara-Webhook/bf126598c478d8f4149f823a3651c44e3a268119 X-Samsara-Timestamp: 1587597109 X-Samsara-Signature: v1=b2d6e7f01a882a8861c2fee2fc00732dd79eaaadc67d0374b95f4bca252f2ec2 X-Samsara-Request: bf72239c-bebd-4c22-b64c-6fc692ef7c46 X-Samsara-Event-Type: Alert Content-Type: application/json Content-Length: 700 { "eventId": "bf72239c-bebd-4c22-b64c-6fc692ef7c46", "eventMs": 1587597109477, ... and the Content-Length is included in the header. I need that information to receive correctly the message. On the other hand, in the Webhook reference, the header does not have the Content-Length: Payload Headers Header Description X-Samsara-Timestamp The Unix epoch timestamp in seconds of when the webhook notification was sent by the Samsara server. This value is also used to create the webhook signature. X-Samsara-Signature A signature created using your webhook's secret key. This allows you to verify the notification is coming from Samsara. See Webhook Signatures for more details. X-Samsara-Request The ID of the webhook notification. This can be helpful in debugging the issue when contacting support. X-Samsara-Org-Id The ID of your organization. This can be helpful in debugging the issue when contacting support. X-Samsara-Event-Type The type of webhook notification. See the Payload Body section for more details. User-Agent Value is always Samsara-Webhook/ followed by an opaque string. This should not be used to verify the request is coming from Samsara, as it can be easily spoofed. Instead, use the signature which is signed with your secret key. Content-Type Value is always application/json. Is it possible to add the item Content-Length to the header? I made some tests with Postman and without that item, I receive an error "400 Bad Request" Thank you very much, Pierre
ANSWERED

How to use Live Sharing URL on our own apps?

Hello, I work in the IT team at a company that uses Samsara. Samsara includes a feature for generating Live Share URLs. Is there a way to utilize this feature in our web application? Also, I observed through the developer tools that when I click the Live Share button and then the Share button, a request is sent to receive the `KEY` of the Live Share URL in the response. `KEY` here means below. ```http /fleet/viewer/KEY ``` Is there a way to utilize the Request URL for generating the `Key`? I tried using it in my own way, but I kept getting a `401 Unauthorized: csrf` error. I'm also curious to know if there's any authentication required to make it work. I would appreciate your help.
ANSWERED

Vehicle/Device and Driver info for mobile application

We are developing a mobile application that runs alongside the Samsara driver mobile application. Is there a mobile SDK or recommended way to obtain the vehicle/device that the mobile is currently "working with" and to get notification of the driver login and logout within the mobile software environment? Things that we are wondering: - is there a well-known name for the gateway that shows up as a wifi SSID? - is there an android intent/notification that can be "hooked" when a driver logs in or out of the samsara driver app? Any insight is appreciated.
ANSWERED

Camera Health Status

Hello, I'm having issues trying to GET our camera health status from the Samsara API. When pulling from the "List all gateways" endpoint, the field healthStatus shows "Unsupported Product" for cameras (model CM32). Is this data that will be integrated at some point? Or is there another endpoint that provides this info? Or am I missing something completely? Thanks!

Pairing Vehicle to a Gateway

The Update a Vehicle Patch says you can update the gateway serial number assigned to a vehicle. I have copied the exact documentation below. Every time we try do this we just get a 500 error "Internal Server Error". This would be an incredibly useful feature but we are unable to get it to work using the provided documentation. "The serial number of the gateway. By default: empty. This can be set to a different gateway's serial number to pair this vehicle with a different gateway."
ANSWERED

Fuel Consumption And MPG

Hi there I'm just wondering how Samsara calculates fuel consumption and miles per gallon Is there any formula? I could figure it out myself Are all the indicators fuel consumption and miles per gallon correct ? Thank you Best Regards
ANSWERED

Skip Pagination?

Hello, We are using Power BI as a dashboard to overview all HOS logs for our drivers. The documentation regarding is clear and I've successfully established a connection. Thing is, the data I receive as a response is paginated - is there a workaround to have all the data sent at once? (skip the pagination step). Thank you!
ANSWERED

Generate Live Sharing link for Asset via API

Hi, I'm aware that it's possible to manually create a live sharing link with an expiration date for a vehicle from the Assets tab. Is there any support for doing this programmatically through the API? Thanks!