HTTPS Calls from Doorbird to Nuki Smart Lock Pro

Hi…
Am trying to integrate a DoorBird intercom with a NUKI Smart Lock Pro, so that when a DoorBird keyfob is presented the NUKI lock is unlocked.
Have configured the Doorbird to use the NUKI app to control NUKI lock when unlocking because someone is at the door…but want to use the keyfob so I can open the door…
(Have enabled NUKI and NUKI API)
Confident that I have the method nailed, just not the detail.
Fob calls a https call within Doorbird: understand that.
Used Swagger to create the http call: got there eventually…I think as it works from within Swagger…
However…and this is where I am falling down…transferring the URL and CURL from swagger into a http or https string that I can use in a browswer or as a https call in Doorbird…no joy.
So ask is if anyone has an answer to help with this…ideally an example with the sections highlighted that need change…something like this…which I found on this forum…

http://IP:8080/lockAction?nukiId=ID&action=3&token=TOKEN

Also…do I have to use a string that starts with:

http://api.nuki.io/smartlock/123456789/action/lock?

Thanks,
Mike

Hi Mike,

The base URL is https://api.nuki.io/
and you are referring to the correct endpoint:
https://api.nuki.io/smartlock/123456789/action/lock
but we do not allow the usage of API tokens in the URL itself.

Hence you need to authorize using the API token first before calling the endpoint.
You can do this with a manually generated token (i.e. bearer token), or an OAuth2 token, depending on which method you choose for the authorization.

I’m not sure if this answers your question, pls let me know if there are still open questions.

Hi Poonam…thanks for looking at this.

So will look at the authorize method and have a think…
A question leading from this…is it possible to create just a single http(s) request that the Doorbird can execute that authorizes the API token, and then connects to my SL4 via https://api.nuki.io/smartlock/123456789/action/lock or is it going to have to be two http requests? I’m assuming a redirect URL is can be embedded here?
Not sure that the Doorbird hardware device can leverage CURL to make the request…
Thanks,
Mike