What is a webhook?
A webhook is a 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. The requests from Momentum are sent as 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 the data coming in is trustworthy and from the correct source. This is where our webhook token comes in. In each request from Momentum to your servers, there will be a webhook token property passed with it. You can retrieve what your webhook token is via our Customer Success team. If you need to have the webhook token reset due to it being compromised, that can also be done via 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 every time any asset in your fleet has any location data updates. This removes the need to poll for data from the Momentum servers.
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.