What is a webhook?
A webhook is an endpoint URL that accepts a POST request so that one server can send data to another server securely. Different web frameworks have different ways of creating POST request endpoints, so please refer to your framework documentation for guidance on how to set that up. Momentum sends JSON requests to your server.
How is a webhook secured?
Since anyone on the web can send a POST request to your open endpoint, you need a way to verify that the incoming data is trustworthy and from the correct source. This is where our webhook token comes in. In each request from Momentum to your servers, a webhook token will be included. You can retrieve what your webhook token is via our Customer Success team. If you need the webhook token reset due to compromise, that can also be done through the Customer Success team.
What does a webhook request look like?
Momentum has different webhooks for different scenarios, but here is an example of a Location Webhook request body:
{
“creationDate”: “2020-05-09T10:11:12.000Z”,
“heading”: 102,
“latitude”: 32.1256,
“longitude”: -108.5342,
“serialNumber:” 000000,
“speed”: 10,
“tenantId”: “XXXXX-XXXXXXXX-XXXX”,
“timestamp”: “2020-05-09T10:11:12.000-05:00”,
“token”: “XXXXX-XXXXXXXX-XXXX”,
“webhookType”: “LocationUpdate”
}
Note: This webhook is sent whenever any asset in your fleet receives location data updates. This eliminates the need to poll the Momentum servers for data.
How to setup my Webhook?
Please reach out to your customer rep or send a request to customersuccess@momentumiot.com
Comments
0 comments
Article is closed for comments.