Open Platform
Skip to content

Instructions for recurring, one-time and permanent ekeys ​

The cloud API Send ekey: https://cnapi.sciener.com/v3/key/send is also for sending recurring, one-time and permanent ekey.

When sending one-time ekey, you should request with parameter endDate = 1, other parameters are the same as timed ekey,after unlocking once with the one-time ekey, you should delete the ekey from your APP and call Delete ekey API to delete the ekey from the cloud;

When sending permanent ekey, request with startDate=0, endDate=0, other parameters are the same as timed ekey;

When sending recurring ekey, startDate and endDate parameters are different from the timed ekey,and there are another four parameters: keyType, weekDays, startDay, endDay. When change period of a recurring ekey, another three parameters: weekDays, startDay, endDay should be present. You have to decide if the recurring ekey is valid in your APP.

1 Request parameters for sending recurring ekey ​

NameTypeRequiredDescription
clientIdStringYclient_id from Create application
accessTokenStringYAccess token,refer to: Get access token
lockIdIntYLock ID, generated by Lock init
receiverUsernameStringYThe receiver's username
keyNameStringYKey name
startDateLongYThe time when it becomes valid (timestamp in millisecond),timestamp at the time of current day,for example, if you want the ekey to be valid from 9:00 of each day, then request with timestamp at 9:00 of current day.
endDateLongYThe time when it is expired (timestamp in millisecond),timestamp at the time of current day,for example, if you want the ekey to be expired at 18:00 of each day, then request with timestamp at 18:00 of current day.
remarksStringNComment
emoteEnableIntNIs remote unlock enabled: 1-yes, 2-no
keyRightIntNIs an authorized ekey: 1-yes, 0-no,the default value is 0
createUserIntNAuto 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.
keyTypeIntNKey type:4-recurring ekey
weekDaysJsonArray[Int]NThe week days when the ekey is valid,for example:[1,2,3], for Sunday, Monday and Wednesday, alert: 1 is for Sunday, not Monday.
startDayLongNThe Day when it becomes valid (timestamp in millisecond),timestamp at 00:00:00 of the day.
endDayLongNThe Day when it is expired (timestamp in millisecond),timestamp at 23:59:59 of the day.
dateLongYCurrent time (timestamp in millisecond)

These three APIs: Get the eKey list of an account, Get one ekey, Get ekeys of a lock will response with following extra parameters for recurring ekey:

NameTypeDescription
keyTypeIntKey type:4-recurring ekey
weekDaysJsonArray[Int]The week days when the ekey is valid,for example:[1,2,3], for Sunday, Monday and Wednesday, alert: 1 is for Sunday, not Monday.
startDayLongThe Day when it becomes valid (timestamp in millisecond),timestamp at 00:00:00 of the day.
endDayLongThe Day when it is expired (timestamp in millisecond),timestamp at 23:59:59 of the day.
CopyRight © 2012-2026 Sciener.All Rights Reserved