NUKI smartLockAuth ID

Hello,

I am currently trying to integrate NUKI into a project using the web API.

The main task is to create an access different for each user registered in my project that can be customizable depending on week days and many more.

To do so, when an user register, I am communicating with NUKI API, calling these routes in this order:

  • AccountUser => put /account/user (with the user registered info)
  • SmartLockAuth => put /smartlock/:smartLockId/auth (to create smartlockauth access for the user registered)

After that I need to store in my database the accountUserId to delete the NUKI accountUser for example, and also the smartLockAuth id (ObjectId).

The problem is that when put /smartlock/:smartLockId/auth is called the smartLockAuth id is not available in the response body.

To solve this problem I am calling => get /smartlock/:smartLockId/auth after 5 seconds to get this id, but sometimes the smartLockAuth created is still not available.

So my main question is it is possible to add the smartLockAuth Id (the objectId) in the response body of the method : put /smartlock/:smartLockId/auth

Thanks for your help.

Hi,

the Auth ID cannot be added to the response body as the requests are asynchronous. Meaning it takes some time until the request is executed.

However, you can use our Advanced API (you need to apply via your Nuki Web Account) and register Webhooks. With this you receive the information as soon as the Authorization is on the device.

Alex

1 Like