Send ekey
https://api.sciener.com/v3/key/send
The admin of the locks can't send ekeys to himself
For one lock, any user can only have one ekey.If you send an ekey to someone who already have one, the previous one will be deleted.
Note:It will be a permenant ekey when you set the startDate and endDate to 0
1. Description
Name Type Required Description
clientId String Y The app_id which is assigned by system when you create an application
accessToken String Y Access token
lockId Int Y Lock ID
receiverUsername String Y The receiver's username
keyName String Y Key name
startDate Long Y The time when it becomes valid, timestamp in milliseconds
endDate Long Y The time when it is expired, timestamp in milliseconds
remarks String N Comment
remoteEnable Int N Is remote unlock enabled: 1-yes,2-no
createUser Int N Auto create Sciener account if receiverUsername is not a registered Sciener account: 1-yes, 2-no (default), this parameter take effect only when receiverUsername is a mobile number or email, the created account's password is the last six characters of the username.
date Long Y Current time (timestamp in millisecond)
2.Response
Parameter Type Description
keyId Int ekey ID
errcode Int Error code
errmsg String Error message
3.Example of response
{
    "keyId": 234522,
    "errcode": 0, 
    "errmsg": "none error message"
}