ChastiKey API

  • 44 Replies
  • 9130 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


*

Offline CHT

  • *
  • 5
    • View Profile
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":""}]}


*

Offline CHT

  • *
  • 5
    • View Profile
Re: ChastiKey API
« Reply #32 on: December 29, 2019, 06:11:31 PM »
Don't know whether you're still monitoring this thread, but a problem/request...

Using the API w/ my esp32-controlled lockbox, I look for a lock ID that is set when the box is closed.  No problem there.  I run into a problem, though, if the lock is deleted... the only reasonable option is to open the lockbox.  So, I can 'get out' simply by deleting the lock...

A couple of possible solutions...
1) Running locks can't be deleted (I think this is a suggestion on the 'regular' app as well.  I'd prefer this one...)

2) If the lock is held by a keyholder, allow the API to enumerate locks held by keyholders, and if a user deletes a lock have it still show up (and be maneagable) by the keyholder, even if deleted by the user.  I think this is messier... I don't really like this option.


*

Offline KevinCross

  • *****
  • 1463
  • Gender: Male
    • View Profile
    • ChastiKey.com
Re: ChastiKey API
« Reply #33 on: December 29, 2019, 07:05:19 PM »
The next version of the app gives you an option to disable deletion of locks that are running.
Developer of ChastiKey - The timed keyholder for your chastity device (Available on Google Play and App Store)

ChastiKey.com | Twitter | Facebook | Discord Chat | FetLife Fan Page*

Want to sign up for beta testing?: Android | iOS

*FetLife fan page is not managed by me.

*

Offline CHT

  • *
  • 5
    • View Profile
Re: ChastiKey API
« Reply #34 on: December 30, 2019, 02:02:31 AM »
The next version of the app gives you an option to disable deletion of locks that are running.

Who has the control of disabling lock deletion, though?  The lockee, or the key holder?  If the lockee can control the enable/disable of lock deletion, then I (lockee) could still just enable lock deletion and delete the lock, right?

*

Offline KevinCross

  • *****
  • 1463
  • Gender: Male
    • View Profile
    • ChastiKey.com
Re: ChastiKey API
« Reply #35 on: December 30, 2019, 10:37:07 AM »
Yes you could. It isn't added to stop you from doing that, its to stop you from accidentally deleting it. If you enable it and then delete the lock then it's not really an accidental deletion. It shouldn't be up to a keyholder as to whether or not you can delete a lock you no longer want.
Developer of ChastiKey - The timed keyholder for your chastity device (Available on Google Play and App Store)

ChastiKey.com | Twitter | Facebook | Discord Chat | FetLife Fan Page*

Want to sign up for beta testing?: Android | iOS

*FetLife fan page is not managed by me.

*

guest1224

Re: ChastiKey API
« Reply #36 on: December 30, 2019, 03:23:30 PM »
Don't know whether you're still monitoring this thread, but a problem/request...

Using the API w/ my esp32-controlled lockbox, I look for a lock ID that is set when the box is closed.  No problem there.  I run into a problem, though, if the lock is deleted... the only reasonable option is to open the lockbox.  So, I can 'get out' simply by deleting the lock...

A couple of possible solutions...
1) Running locks can't be deleted (I think this is a suggestion on the 'regular' app as well.  I'd prefer this one...)

2) If the lock is held by a keyholder, allow the API to enumerate locks held by keyholders, and if a user deletes a lock have it still show up (and be maneagable) by the keyholder, even if deleted by the user.  I think this is messier... I don't really like this option.

I'm looking to create a lockbox with esp32 as well. Would you mind sharing more detail? The code I have was from an old emlalock box idea I found years ago that I dont use anymore.

*

Offline Tawny

  • *
  • 112
  • Growing old is mandatory growing up is optional
    • View Profile
Re: ChastiKey API
« Reply #37 on: January 06, 2020, 03:11:40 AM »
I am using an ESP8266 with the API to control a lock box if you want more info DM me on discord


Re: ChastiKey API
« Reply #38 on: January 10, 2020, 10:56:26 PM »
When I lock my device I enter the code in to it. When I trigger the release all the codes given by the API are checked and the lock released if any match. If the lock is deleted the code is lost.

Another option could be to store the lock ID when the device s locked so only that lack can release it.

*

Offline chaste4panties

  • *
  • 8
  • Gender: Male
  • Shhh. Its secret. Panties are my weakness.
    • View Profile
  • Gender: Male
Re: ChastiKey API
« Reply #39 on: January 24, 2020, 03:45:57 AM »
Ever consider adding sliders instead of +/- for adjusting cards?
submissive, lockee, T&D, and many other interests.


*

Offline KevinCross

  • *****
  • 1463
  • Gender: Male
    • View Profile
    • ChastiKey.com
Re: ChastiKey API
« Reply #40 on: January 24, 2020, 08:43:21 AM »
This thread is for API talk, but yes the app had sliders, and it was changed to what's in the app now. In the next version you can type in numbers
Developer of ChastiKey - The timed keyholder for your chastity device (Available on Google Play and App Store)

ChastiKey.com | Twitter | Facebook | Discord Chat | FetLife Fan Page*

Want to sign up for beta testing?: Android | iOS

*FetLife fan page is not managed by me.

*

Offline chaste4panties

  • *
  • 8
  • Gender: Male
  • Shhh. Its secret. Panties are my weakness.
    • View Profile
  • Gender: Male
Re: ChastiKey API
« Reply #41 on: January 26, 2020, 07:16:28 PM »
Thanks Kevin,

Soon after posting the idea, I discovered pressing and holding the +/- rather than tapping would more rapidly change the numbers.  However, I didn't notice a way of deleting my previous suggestion.

Thanks again and apologies if hit the wrong thread.

submissive, lockee, T&D, and many other interests.


Re: ChastiKey API
« Reply #42 on: April 06, 2020, 08:24:33 AM »
Do you think there will ever be more features than checking data? I think it could be fun to make something kinda like Discord's bot api.

Let users trust the program completely, or limit it like a more restricted key holder. So I could let someone's app do whatever with my variable lock, or limit them to only a adding/removing x red cards, or adding/removing 1 of any card ect. something like that. I'm noticing the api is all html requests, so this seems like it might not really be possible without a lot of work, but I'd be interested to see it done!

One idea I had just spitballing then was like chastity poker. You could set up a game, and at the start tell the program you're willing to add up to x red cards, and maybe leave a minimum of y red cards, then have like a group of 4 locked friends play poker. You win a hand, you get the pot's number of red cards removed from your lock, everyone else gets the pot's number of red cards added to their lock. Maybe when you've hit your max, you could add a random card of one of the more fun cards, like a freeze, or double up, or reset, or just a yellow ect. This could be easily made into a discord bot with a text based game, and would be pretty cool.

The other pretty basic idea I had for this was again, like a kinky assignment discord bot. someone trusts the bot to whatever extent prior, or whatever. they ask for a task via the bot, someone gives them the task, maybe assigns it a difficulty or reward/punishment ect. the person does or fails to do the thing. then the assigner tells the bot weather it was completed, and the bot sends out the reward or punishment to the lock.

Re: ChastiKey API
« Reply #43 on: April 09, 2020, 08:56:56 PM »
+1 for using the API to pick cards. +1 to do what the keyholder can do with the API.

*

guest6516

Re: ChastiKey API
« Reply #44 on: May 23, 2020, 04:43:03 PM »
+1 for more than just a read only API. I would really like to be able to modify the lock as well. Event as a lockee, you can still add time in the app, which would allow for some interesting opportunities. I am thinking about some simple games (like a wheel of fortune or something like that), that would use the API to add time if you loose. Or scripts, that could easily be triggered by some external events.

I know, a lot of people would like to have this build into the app itself, but I wouldn't mind to build some mini games myself.