Lockitron Community

Using API with Virtual Lock


I tried using the Python script to unlock and lock my virtual lock. But each time I run the Python script, I get a "No JSON object could be decoded " error…
I am using the access code and udid that is specific for my account and I can see the virtual lock on the app on my phone. Am I doing something wrong?

The Python script I’m using is


@azure Hey there,
I don’t work for Lockitron, but let me see if I can help.

The Python script you’ve linked is part of the older V1 API. While the documentation is still available for historical reasons, I’m not sure it works anymore.

V2 is the way to go, and depending on your use case, there may already be something out there that will work. Any particular reason you want to access the lock?


@anthonylavado Thanks for the reply!
That makes sense…
I’m trying to connect a Lockitron with a facial recognition system. I don’t know much about JSON or REST so I was looking at the python code. If you know of any documentation that might be helpful, please let me know.
Thank you.