diff --git a/NUKI-DEVELOPER-%7C-Nuki-Bridge-HTTP-API.md b/NUKI-DEVELOPER-%7C-Nuki-Bridge-HTTP-API.md index 8c21e0f..8cf8087 100644 --- a/NUKI-DEVELOPER-%7C-Nuki-Bridge-HTTP-API.md +++ b/NUKI-DEVELOPER-%7C-Nuki-Bridge-HTTP-API.md @@ -154,3 +154,37 @@ Possible doorsensor states (used in Endpoints below). ## 5. Endpoints ### /auth +
URL | +http://192.168.1.50:8080/auth | +|
---|---|---|
Usage | +Enables the api (if not yet enabled) and returns the api token. If no api token has yet been set, a new (random) one is generated. When issuing this API-call the bridge turns on its LED for 30 seconds. The button of the bridge has to be pressed within this timeframe. Otherwise the bridge returns a negative success and no token. | +|
Response | +JSON list containing the success of the authorization | +|
token | +The api token | +|
success | +Flag indicating the success of the authorization | +|
Errors | +HTTP 403 | +Returned if the authentication is disabled | +
Example-Call | +http://192.168.1.50:8080/auth | +|
Example-Response | +{ "token": “token123”,"success": true} | +