Setting up Sigfox Callbacks

If your device is trasmitting data over the Sigfox network, you will need to set up the Sigfox callbacks to receive data from the devices. UnaConnect has multiple callbacks to allow Sigfox services to forward the data.
The first thing to know is that all callbacks are protected by a unique group token, which can be found in the Settings tab of a device group on the UnaConnect Console.

  1. On the left navigation bar in the UnaConnect Console, click on the Settings tab, and the Settings page is displayed.
  2. In the Group Information section, click on the Copy Token button to copy the token into your clipboard.
  3. Login to the Sigfox Backend with your Sigfox Backend credentials.
  4. Click on the Device Type tab on the top of the page, and enter the name of the device type then click on the Filter button.
  5. Click on the name description and click on Edit in the dropdown menu.
  6. On the left navigation bar, click on the Callbacks tab.
  7. Click on the New button on the top right corner and provide the following information according to your needs.
⚠️ For all types of callback, the HTTP method is POST. One header has to be provided: header Authorization and value Bearer TOKEN_OF_GROUP_COPIED. The content-type must be application/json

Type DATA
Channel URL
Subtype BIDIR
URL Pattern https://network.unaconnect.io/sigfox/data with the following Body:
{
  "device": "{device}",
  "data": "{data}",
  "time": "{time}",
  "seqNumber": "{seqNumber}",
  "ack": "{ack}"
}

Type SERVICE
Channel URL
Subtype DATA_ADVANCED
URL Pattern https://network.unaconnect.io/sigfox/data-advanced with the following Body:
{
    "device": "{device}",
    "time" : "{time}",
    "seqNumber": "{seqNumber}",
    "linkQuality": "{linkQuality}",
    "fixedLat": "{fixedLat}",
    "fixedLng": "{fixedLng}",
    "operatorName": "{operatorName}",
    "countryCode": "{countryCode}",
    ⚠️ "computedLocation": {computedLocation}, ⚠️
    ⚠️ "duplicates": {duplicates} ⚠️
}
⚠️ computedLocation and duplicates are only accessible if allowed by your Sigfox contract

Type SERVICE
Channel URL
Subtype STATUS
URL Pattern https://network.unaconnect.io/sigfox/status with the following Body:
{
  "device": "{device}",
  "time": "{time}",
  "batt": "{batt}",
  "duplicate": "{duplicate}",
  "seqNumber": "{seqNumber}"
}

Type SERVICE
Channel URL
Subtype ACKNOWLEDGE
URL Pattern https://network.unaconnect.io/sigfox/acknowledge with the following Body:
{
  "device": "{device}",
  "time": "{time}",
  "infoCode": "{infoCode}",
  "infoMessage": "{infoMessage}",
  "downlinkAck": "{downlinkAck}",
  "downlinkOverusage": "{downlinkOverusage}",
  "station": "{station}",
  "rssi": "{rssi}",
}

Type ERROR
Channel URL
URL Pattern https://network.unaconnect.io/sigfox/error with the following Body:
{
  "device": "{device}",
  "time": "{time}",
  "info": "{info}",
  "severity": "{severity}"
}

Event Type Any
Channel URL
URL Pattern https://network.unaconnect.io/sigfox/event
{
"time":"{time}",
"severity":"{severity}",
"sourceId":"{sourceId}",
"sourceType":"{sourceType}",
"eventType":"{eventType}",
"deviceMessageTime":"{deviceMessageTime}",
"contractId":"{contractId}",
"businessOperatorId":"{businessOperatorId}",
"deviceTypeId":"{deviceTypeId}",
"groupId":"{groupId}",
"subscriptionState":"{subscriptionState}"
}