Https integration (Webhook)

I have a brand new LTE-M device, which is running a tracking application and delivering data to a back end in which I can create a webhook to pass the data on (it works, I have tried it with webhook.site and also a custom app that a colleague built. I’d like to try to get the data into tago.io and have configured t like this

(The token is truncated).

It does not work, so I guess this is malformed … can anyone give me a hand to format it correctly?

The payload is quite easy to deal with, I think ,.

{
      "serial": "CL352656104880656",
      "data": {
        "type": "G1",
        "mcc": "234",
        "mnc": "10",
        "latitude": "51.457073",
        "longitude": "-0.219610",
        "altitude": "87.588470",
        "speed": "0.996165",
        "heading": "88.351692",
        "fix_epoch": "1615190259",
        "battery_voltage": "2752",
        "x_accel": "1.685508",
        "y_accel": "-1.072596",
        "z_accel": "8.733996",
        "uptime": "75225351"
      }
    }

Ok, I solved that problem by moving the token down as a header, and I get data appearing in tago.io !!

But, by default the variables are not being extracted as payload … this is what I see … what do I need to do next?

Sorry … noob questions …

Hi @pat.molloy, I’m a bit late but maybe I can help a little? I believe you will need to use a payload parser when sending data in this format. Tago has a specific JSON format, it looks like this in the most basic form:

{
    variable: XYZ,
    value: XYZ
}

If you go to the payload parser and select the “Convert Raw JSON to TagoIO JSON” snippet you should get a general idea of how to continue. Unfortunately I’ve never used it, but that should be the most basic solution for you.

Depending on what your webhook is built on, you could also parse the data into the TagoIO JSON format before forwarding the data or even use the NodeJS SDK to skip the Tago API entirely. The biggest plus of using the SDK is that you don’t need to keep track of the device-token.

Let me know if I you have further questions regarding this or anything else!