Integration Issues with Nuki Web API: Unable to Retrieve Lock State

Hello Nuki Developer Community,

I’m currently working on integrating Nuki locks into a home automation system using the Nuki Web API. While the API documentation is clear, I’m running into an issue when trying to retrieve the lock state of my Nuki Smart Lock.

Here’s the basic flow I’ve implemented:

  1. I first authenticate the user via OAuth 2.0, which seems to work fine, as I’m able to receive the access token.
  2. Using the access token, I’m attempting to call the GET /lockstate endpoint to retrieve the current state of the lock.
  3. However, the response is always returning an error with a status code of 400 or 500, and the payload often includes a message indicating an “internal server error” or a “bad request.”

I have ensured that I’m following the API request format as described in the documentation, including the correct URL and headers, and I’m passing the proper access token. To rule out any issues on my end, I’ve tried making the API call using both Postman and cURL, but I continue to receive the same error.

Could anyone from the community provide insights into why this might be happening? Has anyone experienced similar issues while retrieving the lock state via the Nuki Web API? Any tips for debugging or potential causes would be greatly appreciated.

I’m using the following API endpoint: https://api.nuki.io/smartlock/<LOCK_ID>/state

I also checked this: https://developer.nuki.io/t/unable-to-create-user-account-using-web-api/golang

Looking forward to hearing from you!

1 Like