From 838171eadaf82c6b430ff9037b8f60d3d145adce Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Sun, 28 Nov 2021 20:59:52 +0100 Subject: [PATCH] =?UTF-8?q?=E2=80=9EDocuments=20Bridge=20API=E2=80=9C=20?= =?UTF-8?q?=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Documents-Bridge-API.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Documents-Bridge-API.md b/Documents-Bridge-API.md index 191fc02..8406dac 100644 --- a/Documents-Bridge-API.md +++ b/Documents-Bridge-API.md @@ -23,3 +23,25 @@ The following base url will be used in upcoming examples: http://192.168.1.50:8080/ + +## 3. Bridge discovery & API activation +Calling the URL https://api.nuki.io/discover/bridges returns a JSON array with all bridges which have been connected to the Nuki Servers through the same IP address than the one calling the URL within the last 30 days. The array contains the local IP address, port, the ID of each bridge and the date of the last change of the entry in the JSON array. + +### 3.1 Example +{ + "bridges": [ + { + "bridgeId":2117604523,"ip":"192.168.1.50","port":8080,"dateUpdated":"2017-06-14 T06:53:44Z" + } + ], + "errorCode":0 +} +Once a bridge has been discovered on the LAN the API can be activated and the API token retrieved by calling the /auth command. The user has to confirm this request by pressing the button on the bridge. For more details see the description of the /auth command. Alternatively you can activate the API and set the token by managing the Bridge in the Nuki App. + +If discovery is disabled via /configAuth or through the Nuki App, the IP is 0.0.0.0 and the port 0. In this case the /auth command fails with HTTP error 403. + +#### 3.1.1 Alternative via Nuki App +As an alternative you can activate and manage the Bridge API via the Nuki App by opening Burger menu > Manage my devices > Bridge and follow the described steps: + +### 3.2 Token +We offer two ways of verifying calls to endpoints with a token: \ No newline at end of file