Smith Magadia
Smith Magadia

Reputation: 1

Kontakt iBeacon: REST API - Updating the Beacon using the secure config

Anyone here have used the Kontakt's REST API, to completely update the beacon the new way (beacon with at least Firmware 4.0) using the secure config? I have followed their API document and have done the steps below, but I am stuck at the last/3rd step. Just checking here while waiting from Kontakt's technical support to help me out.

STEPS:

  1. Update beacon by creating a config e.g. "/config/create?uniqueId=abc&deviceType=beacon&txPower=2"

  2. For the newest beacon (Firmware 4.1), get the secure config from the response of e.g. "/config/encrypt?uniqueId=abc". The secure response is from response's configs[0].config value, and this is what I send in the response parameter in the 3rd step below.

I am not sure if that is the right one to pass as it's not clearly stated in the document.

  1. And lastly to synchronize state, update the cloud by sending the secure config e.g. "/device/update?uniqueId=abc&updated=1489619160440&response=AAMQIgDbyMlY7zruGWl89..."

The API is throwing Error 500 - Internal Server Error with this exact error code API_ERROR_1489800045650.

Upvotes: -1

Views: 310

Answers (1)

mrtnclzd
mrtnclzd

Reputation: 73

A beacon's configuration needs to be applied to the beacon by connecting to it using a Bluetooth interface, this cannot be done through a RESTful API service alone.

Changes in configuration for Kontakt.io beacons can be prepared over their RESTful API, but need to be applied through a BLE connection; at which point, the beacon will create a "secure response" that needs to be synced back to their API.

Kontakt.io's SDK already handles this, documentation for "Writing a new configuration to a beacon" covers this in depth, and there is some sample code in their GitHub account:

Upvotes: 1

Related Questions