Skip to content

HTTP Receiver

ResIOT comes a built-in web EndPoint for you to push data to.

HTTP EndPoint URL

To retrieve the URL EndPoint of your web server, head to Data Connectors -> HTTP Receivers. By default ResIOT comes with a pre-installed receiver which can be used by everyone without any configuration needed by the user.

This guide will explain how to push data to ResIOT via the pre-installed receiver.

In order to execute a valid request, when pushing data you will need to enter a few headers along with a json body in a format that ResIOT accepts.

HTTP Headers

Only two headers are required in your request:

Content-Type: application/json
authorization: [VALID_HTTP_SECURITY_TOKEN]

As you can see, a valid security token is needed by ResIOT in order to understand who is reaching the platform. To create a valid token for HTTP receivers, please refer to the Tokens page.

HTTP Body

Only a few data is required for your request to work. The request body has to be a valid JSON with the following format.

{
    "msgtype" : "data_uplink",
    "data" : "[hex_encoded_payload]",
    "deveui": "[your_device_DevEui]",
    "appeui": "[your_device_AppEui]"
}

Here's a valid example:

{
    "msgtype" : "data_uplink",
    "data" : "a2b3cc",
    "deveui": "1111",
    "appeui": "1234123412341231"
} 

The msgtype field is mandatory, and the value must be set to data_uplink as it tells the receiver we're talking about a device sending data. If omitted, or with a different value, the server will not treat the request as a comm_rx.

The data field is the application payload of your device and has to be hex-encoded.

The deveui field is mandatory and it represents the device ID of the device sending data.

The appeui field is optional and needed only for LoRaWAN devices, the platform will take care of assigning/retrieving the application to your device if it's omitted.

Device Auto-provisioning

You can configure ResIOT to automatically create/register devices sending data to your HTTP endpoint.

In order to do so, head to your Settings -> Organization Settings page and make sure the HTTP Receiver Autoprovisioning flag is checked.