Getting Started
Official Site
Getting Started
Official Site
  • Document description
  • Read before you start

  • Light application development guide

  • Mobile application development guide

  • Cloud live development guide

  • Desktop application development guide

  • Third party development guide

  • Message push development guide

  • IoT things data model

  • HTTP interface

    • Development specification
    • API privacy policy
    • Postman interface simulation call
    • accessToken: Get administrator token
    • API request example
    • Account docking
    • Push configuration
    • Cloud storage service
    • Equipment management

    • Device configurat

    • Video equipment

    • Device message
    • Device live broadcast
    • Device lock access
      • getDevicePowerInfo: Get device lock power information
      • openDoorRemote: Open the door remotely
      • deleteDoorKey: Destroy the key
      • generateSnapkey: Generate door lock password
      • getDoorKeys: Get a list of secret keys
      • getOpenDoorRecord: Get the door opening record
      • getSnapkeyList: Get a list of temporary keys
      • wakeUpDevice: wake up dormant door lock device
      • doorbellCallAnswer: Answer the call of Video Intercom Outdoor(VTO)/doorbell
      • doorbellCallHangUp: Hang up the call of Video Intercom Outdoor(VTO)/doorbell
      • doorbellCallRefuse: Refuse the call of Video Intercom Outdoor(VTO)/doorbell
  • Reference documents

On this page
Function details
Request address
Minimum permissions required for sub-account token request
Incoming parameter description
Sample input
Return data field description
Sample output

generateSnapkey: Generate door lock password

generateSnapkey: Generate door lock password

Function details

Generate the door lock password.

Request address

https://openapi-[DataCenter].easy4ip.com/openapi/generateSnapkey

Minimum permissions required for sub-account token request

"Permission":"Config" "Resource":"dev:serial number"

Incoming parameter description

Parameter name Parameter type Is it required? Default value Legal value Parameter description
token String Yes Administrator or sub-account accessToken
deviceId String Yes Door lock device serial number
name String Yes Secret key name
effectiveNum Integer Yes -1: Unlimited times Valid times
effectiveDay Integer Yes [1,90] Valid days
effectPeriod period String Yes Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. You can also use "Monday, Wednesday, Friday" to select multiple options Valid period, cross-day is not supported
beginTime String Yes The time format is HH:mm:ss Start time
endTime String Yes The time format is HH:mm:ss, the end time is greater than the start time End time

Sample input

{
    "system":{
        "ver":"1.0",
        "appId":"lcdxxxxxxxxx",
        "sign":"b17b34edaa0d68ab7590fea2ca45f051",
        "time":1603356648,
        "nonce":"1f62152b-074b-45cd-b9b6-2b00117db8f3"
    },
    "id":"63d9e876-e223-481c-9886-6386d57556da",
    "params":{
        "deviceId":"TESTQWERXXXX",
        "token":"At_00000ad9e6e87f0142eb92e207aec46a",
        "name":"key001",
        "effectiveNum":-1,
        "effectiveDay":7,
        "effectPeriod":[
            {
                "period":"Monday",
                "beginTime":"12:00:00",
                "endTime":"18:00:00"
            }
        ]
    }
}

Return data field description

Field nameField typeField description
keyStringUnique ID of the door lock secret key
nameStringDoor lock secret key name

Sample output

{
  "result":{
    "msg":"The operation was successful.",
        "code":"0",
        "data": {
            "key":"13686275",
            "name":"key001"
        }
    },
    "id":"63d9e876-e223-481c-9886-6386d57556da"
}
deleteDoorKey: Destroy the key
getDoorKeys: Get a list of secret keys