Add QR code
https://api.sciener.com/v3/qrCode/add
Create a "QR code" in the cloud server, the response will contain a H5 page link displaying a QR code(valid for 10 minutes, can be refreshed), put the QR code close to the camera of the lock, the lock will scan the QR code and identify the information in the QR code, hence unlock the lock.
If you don't want to use the default QR code link page, you can call
[get QR code data] interface to get the content of QR code data, and generates the QR code image based on the content.
Note: only specific types of locks support QR code function. If the lock does not support QR code function, "The lock does not support this function" will be alerted.
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 |
name |
String |
N |
Qr code name |
type |
Int |
Y |
QR code type, 1-period, 2-permanent, 4-cyclic |
startDate |
Long |
N |
The time when it becomes valid, timestamp in milliseconds |
endDate |
Long |
N |
The time when it is expired, timestamp in milliseconds |
cyclicConfig |
JSONArray |
N |
The cyclic time configuration, the startTime and endTime off each week day must be the same at the moment |
date |
Long |
Y |
Current time (timestamp in millisecond) |
cyclicConfig
Parameter |
Type |
Description |
startTime |
Int |
Start time of cyclic, in minutes, for example 480 for 8:00 |
endTime |
Int |
End time of cyclic, in minutes, for example 1080 for 18:00 |
weekDay |
Int |
Week day, 1-7, 1 for monday and 7 for sunday. |
2.Response
Parameter |
Type |
Description |
qrCodeId |
Int |
QR code id |
qrCodeNumber |
Int |
QR code number: the unique number of QR code in a lock. It's will be contained in the unlocking records for identifing which code unlock the lock. |
link |
Int |
The H5 page URL displaying QR code |