ChastiKey API

  • 31 Replies
  • 2601 Views
Re: ChastiKey API
« Reply #30 on: May 17, 2019, 11:01:48 PM »
There's now a version 0.3 of the API available.

Hi Kevin, I just wanted to say thank you for the API. This is great.
I discovered that the API URL can also be accessed through unencrypted HTTP http://api.chastikey.com.

This may weaken security as the server messages can be intercepted.
Unencrypted HTTP may be acceptable as long as no commands can be issued through an API call.

But: Please don't close this loop hole! I am using the API to control a rather complicated smart lock: a cell door lock operated by a micro controller. I built it almost a decade ago. It is still in use and its function has greatly improved through Chastikey. Because there is no newer driver for the microcontroller available, all physical lock control software has to run on Windows XP. Windows XP doesn't support TLS 1.2, which is used at the HTTPS site. Therefore I can only connect to the API through unencrypted HTTP. Shutting downs the HTTP port would cause a small problem here.

Love,
zorkl


Re: ChastiKey API
« Reply #31 on: May 21, 2019, 08:59:26 PM »
Interesting (?) bug... I have a lock that on the app has unlocked, but in the API still shows as locked?  Lock 1558398531 is the incorrect one... the other lock is still active....

(It's not important, as I've already unlocked it, but if I was using this lock for my lockbox I'd probably be a little less happy! :)

http://api.chastikey.com/v0.3/listlocks.php?username=CharlieH

The JSON response is:

{"response":[{"status":200,"message":"Success","timestampGenerated":1558468145}],"locks":[{"lockID":1558398531,"lockedBy":"Hailey","lockFrozen":0,"timestampLocked":1558398531,"timestampUnlocked":0,"status":"Locked","combination":""},{"lockID":1558447634,"lockedBy":"Hailey","lockFrozen":0,"timestampLocked":1558447634,"timestampUnlocked":0,"status":"Locked","combination":""}]}

http://api.chastikey.com/v0.3/checklock.php?username=CharlieH&lockid=1558398531

{"response":[{"status":200,"message":"Success","timestampGenerated":1558468559}],"locks":[{"lockID":1558398531,"lockedBy":"Hailey","lockFrozen":0,"timestampLocked":1558398531,"timestampUnlocked":0,"status":"Locked","combination":""}]}