https://api.sciener.com/v3/key/send
The ekey receiver can login Sciener APP to get the ekey send by lock administrator.
If the developer want to develop your own APP based on our APP SDK,the ekey can be requested by cloud API: Get the eKey list of an account with access token get by receiverUsername and it's passowrd.
receiverUsername should be account registered in Sciener APP or user registered by cloud API: User register.
If receiverUsername is a mobile phone number or email account which is not registered yet, you can request with parameter createUser=1, the cloud will automatically create an user account for it, the default password of the account is the last six char of receiverUsername , for example: receiverUsername=+158876191905, it's default password will be 191905.
A user account can only have one ekey for a lock, so if you send ekey to a user already have this lock's ekey, the old ekey will be deleted.
Send ekey to oneself or top administrator is forbidden.
POST, ContentType:application/x-www-form-urlencoded
xxxxxxxxxxcurl --location -g --request POST 'https://api.sciener.com/v3/key/send' \--data-urlencode 'clientId=4773aa036f7f49c68d876bb4be85c80c' \--data-urlencode 'accessToken=dfd5489d0cee31f0bdfaf59d0d42d71f' \--data-urlencode 'lockId=163377' \--data-urlencode 'receiverUsername=18876191905' \--data-urlencode 'keyName=Ekey for jack' \--data-urlencode 'startDate=1625025703000' \--data-urlencode 'endDate=1635025703000' \--data-urlencode 'createUser=1' \--data-urlencode 'remarks=Have a nice day.' \--data-urlencode 'date=1625025703000'| Name | Type | Required | Description |
|---|---|---|---|
| clientId | String | Y | client_id from Create application |
| accessToken | String | Y | Access token,refer to: Get access token |
| lockId | Int | Y | Lock ID, generated by Lock init |
| receiverUsername | String | Y | The receiver's username |
| keyName | String | Y | Key name |
| startDate | Long | Y | The time when it becomes valid (timestamp in millisecond) |
| endDate | Long | Y | The time when it is expired (timestamp in millisecond) |
| remarks | String | N | Comment |
| remoteEnable | Int | N | Is remote unlock enabled: 1-yes, 2-no |
| keyRight | Int | N | Is an authorized ekey: 1-yes, 0-no,the default value is 0 |
| 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) |
| Parameter | Type | Description |
|---|---|---|
| keyId | Int | Ekey ID |
xxxxxxxxxx{"keyId": 56323}