NUKI Smart Lock 3.0 Pro https webhook to open/close the door

Hi Dev’s,
i own the NUKI Smart Lock 3.0 Pro and connect it with wlan to the internet. I can open/close the door via the Nuki Web. I create already a api token.
How it is possible to use a https call with the token for open the door?

Cheers Ingo

Sections 3&4 of the API documentation contain detailed instructions on how to create calls that can be executed with a command line tool (e.g. curl) to open/close a Smart Lock.

https://developer.nuki.io/page/nuki-web-api-1-4/3#heading--swagger-interface

For example, to unlock the lock you use this web request

url: https://api.nuki.io/smartlock/<LOCK_ID>/action/unlock
headers:
   Content-Type: application/json
    Authorization: Bearer <YOUR TOKEN>
1 Like

Thanks for your help, i’ve check the commands on Swagger UI but i can’t find a info how to get the LOCK_ID. Do you have a suggestion how i can find out?

Use GET https://api.nuki.io/smartlock to get a list of all your smarlocks with smartlockId

1 Like

Thanks for your help, i can open and close the door now with Swagger UI and Swagger UI

But i don’t understand how it works with https… I would like send the https as a action from doorbird device.

For example, 123456789 is my lock id and xyz my API token
Action in the web interface of doorbird:

https://api.nuki.io/smartlock/123456789/action/unlock headers: Content-Type: application/json Authorization: Bearer xyz”

This is not working. How to decode the headers in the https call?

Does regular curl work?

curl -X POST --header 'Content-Type: application/json' --header  'Authorization: Bearer xyz' 'https://api.nuki.io/smartlock/123456789/action/unlock'

No, it’s not working.
I’ve a second option using a webhook from doorbird to homee and from homee to nuki. I post some pictures of this configuration, maybe you have an idea, because that doesn’t work either…





I’m sorry but I don’t know either doorbird or homee so I can’t really comment on them.
Can you try to run the curl command in a command line / terminal window and paste it’s output?

Hi! Do i need the Bridge to do so? Or only the Nuki 3.0 Pro (WiFi)?

Thank you.

The bridge will allow local HTTP API calls.
The SL 3 Pro and bridge both work with the remote API, so if you have a SL3P you can use the cloud based API without a bridge

Thank you! And what if someone knows the URL of me, then he can open the door?

You need to generate an API key in advance at Nuki Web and pass it in a header in all API calls. This acts as a password to block unauthorized API calls.
More details here: Nuki Web API

Hi there, this is my first post.
Thanks to this thread, I was able to setup my http request for my Smartlock 3 Pro.
My use case: As the homekit integration does not support to open (=unlatch) the door while already unlocked, I defined a switch that is doing this.
My feedback: The smartlock ID was the most challenging part as Nuki Web shows “a” Smartlock ID for my device (within administration) that is a totally different one I got (and finally need) from the GET