1、API List

This section contains the API used for third-party customers integrate DDNS functionality.

See the following list:

No. Function Description
1 Get access token Get access token through neutral login web page.
2 Get access token via appKey and secret Get access token through Http interface.
3 Refresh access token Refresh access token through Http interface.
4 Get device DDNS information Get device DDNS information.
5 Set device DDNS domain Set the device DDNS domain.
6 Set device DDNS auto mapping Set device DDNS auto mapping mode.
7 Set device DDNS manual mapping Set device DDNS manual mapping mode.
8 Get DDNS information of all the devices Turn page to get the DDNS information of all the devices in the account.
9 Share device DDNS information Share DDNS information to other account.
10 Add Device Add the device to the login account.
11 Get DDNS information of all the shared devices Get DDNS information of all the shared devices in the account.
12 Get area list of all the nations Get area list of all the nations.

1.1. Get access token

Parameter Type Required/Not Required Description
appKey String Yes Developers have access to an application from a EZVIZ open platform when they apply for a new application. AppKey is the unique identifier of the application, open platform identify the application developer by appKey.
areaId int Yes The nation area ID of registered user. Call API /api/lapp/area/list to get all the area ID.
response_type String No defaut: token. The value of response_type is token or refresh_token. token: If login , it will return accessToken(Access token obtained during authorization), refresh_token: It will return accessToken and refresh_token(Refresh token is used to refresh AccessToken when it was expired)
client_type int String Client's type : 11-IOS, 13-Android, 19-PC client
bundleId String No Bundle id is the application's identifier, indicating the difference between application and other App.If client_type is 11 or 13 , the parameter is necessary
Field Type Description
access_token String Access token obtained during authorization.
expires_in long Expiry date of access token.
areaDomain string The domain name of the open platform service in the user's region. The obtained access token is valid in the user's region only, and use this domain name and access token when calling other interfaces of open platform services.
refresh_token String Refresh token is used for refresh AccessToken when it was expired
open_id String Authorization id
authDomain String The domain name of the authorize service in the user's region. The obtained refresh token is valid in the user's region only, and use this domain name and refresh token and open id when calling Refresh access token.

1.2. Get access token via appKey and secret

  • API Function

    This API is used for the admin user to get the access token。

  • Request Address

    https://open.ezvizlife.com/api/lapp/token/get

  • Request Type

    POST

  • Request Parameters
Parameter Name Type Description Required
appKey String appKey Y
appSecret String appSecret Y
  • HTTP Request Message
POST /api/lapp/token/get HTTP/1.1
Host: open.ezvizlife.com
Content-Type: application/x-www-form-urlencoded

appKey=9mqitppidgce4y8n54ranvyqc9fjtsrl&appSecret=096e76501644989b63ba0016ec5776
  • Return Data
{
    "data": {
        "accessToken": "at.1b1cg2im66fnsj91090hvhbk43zmnkeh-22yjlfyvm4-0eyh0pl-alewra6g0",
        "expireTime": 1470810222045,
        "areaDomain": "https://iusopen.ezvizlife.com"
    },
    "code": "200",
    "msg": "操作成功!"
}
  • Return Field
Field Type Description
accessToken String Obtained access token
expireTime long Accurate to millisecond
areaDomain String The domain name of the open platform service in the user's region. The obtained access token is valid in the user's region only, and use this domain name and access token when calling other interfaces of open platform services.
  • Return Code
Return Code Return Information Description
200 操作成功 Request succeeded.
10001 参数错误 The parameter is empty or incorrect format.
10005 appKey异常 App is frozen.
10017 appKey不存在 Check the correctness of appKey
10030 appkey和appSecret不匹配 appkey and appSecret mismatched.
49999 数据异常 API call exception.

1.3. Refresh access token

  • API Function

    This API is used for the user to reresh the access token。

  • Request Address

    {authDomain}/oauth/token/refreshToken

    authDomain is get from Get access token,

  • Request Type

    POST

  • Request Parameters

Parameter Name Type Description Required
refresh_token String Refresh_token, The parameter is used for refren the access token Y
grant_type String Grant type, The value is "refresh_token" Y
client_id String Application key, same as "appKey" Y
openId String Authorization id Y
bundleId String Bundle id is the application's identifier, indicating the difference between application Y
scope String Application scope N
state String Used to maintain the state of request and callback, and to bring back the original request after authorization request. This parameter can be used to prevent CSRF attacks (Cross Station Request Forgery). It is suggested that third parties take this parameter and can be set to a simple random number and session for verification. N

openId and refresh_token get from Get access token

  • HTTP Request Message
POST /oauth/token/refreshToken HTTP/1.1
Host: isgpopenauth.ezvizlife.com
Content-Type: application/x-www-form-urlencoded

refresh_token=rt.8n061upasdaadgcw5jb7ixrxn9-1e7un1xwb4-0e7ubbk-1xaz7zsg1&client_id=ae1b9aasdaasdab88da6dbbf2dd8d5&grant_type=refresh_token&open_id=183dasdasd9ab97410c4ffeaa28&scope=xxx&state=xx
  • Return Data
{
    "code":"200",
    "msg":"Operate succeeded!",
    "data":{
        "expires_in": 1513864879148,
        "scope": "basic",
        "openId":"sadfasdfadsfa",
        "refresh_token": "rt.8n061up7c9end2asdasdasdasxn9-1e7un1xwb4-0e7ubbk-1xaz7zsg1",
        "access_token": "at.6rx47zjfa0idqthh6463h5mvdmcaqck5-1hpgib6dd8-0sxfvyq-fj8sask8a",
        "state":"xxx"
    }
}
  • Return Field
Field Type Description
Field Type Description
:-- :-- :--
data RefreshToken information RefreshToken information.
code string Operation code.
msg string Operation message.

RefreshToken Object:

Field Type Description
expires_in long Timestamp,expire time about accessToken
scope String scope
state String state
openId String Authorization id
refresh_token int Refresh_token, The parameter is used for refren the access token
access_token int Access token obtained during authorization.
  • Return Code
Return Code Return Information Description
200 操作成功 Request succeeded.
10001 参数错误 The parameter is empty or incorrect format.
10017 应用不存在 Check the correctness of client_id
10023 client_id和bundleId不匹配 client_id and bundleId mismatched.
49999 数据异常 API call exception.
70003 RefreshToken不存在 Refresh_token is not exist
70004 RefreshToken已过期 Refresh_token is expired
70005 RefreshToken与ClientId不匹配 Refresh_token and client_id mismatched
70006 RefreshToken与OpenId不匹配 Refresh_token and open_id mismatched

1.4. Get device DDNS information

  • Function

    This API is used to get the device DDNS information, including the shared device DDNS information.

  • Request Address

    {areaDomain}/api/lapp/ddns/get

  • Request Method

    POST

  • Request Parameters

Parameter Name Type Description Required
accessToken String Access token obtained during authorization. Y
deviceSerial string Device serial No., at least one of the deviceSerial and domain is required. If the deviceSerial and domain are both provided, searching the deviceSerial first. N
domain string Device domain name. N
  • HTTP Request Report

POST /api/lapp/ddns/get HTTP/1.1
Host: isgpopen.ezvizlife.com
Content-Type: application/x-www-form-urlencoded

accessToken=at.1b1cg2im66fnsj91090hvhbk43zmnkeh-22yjlfyvm4-0eyh0pl-alewra6g0&deviceSerial=519928976
  • Return Data
{
    "data": {
        "upnpMappingMode": 0,
        "domain": "test123456",
        "hiddnsHttpPort": 0,
        "mappingHiddnsHttpPort": 81,
        "hiddnsHttpsPort": 0,
        "hiddnsCmdPort": 0,
        "mappingHiddnsCmdPort": 80,
        "hiddnsRtspPort": 0,
        "deviceIp": "212.140.29.17",
        "subSerial": "704122511",
        "serial": "CS-C13-31WFR0120170112AACC704122511",
        "deviceName": "C2C(704122511)"
    },
    "code": "200",
    "msg": "操作成功!"
}
  • Return Filed
Field Type Description
data HiddnsDeviceInfo DDNS information.
code string Operation code.
msg string Operation message.

HiddnsDeviceInfo Object:

Field Type Description
upnpMappingMode int 1- Manual, 0- Auto.
mappingHiddnsHttpPort int Manual mapping HTTP port, use when upnpMappingMode=1.
hiddnsHttpPort int Auto mapping HTTP port.
hiddnsHttpsPort int Auto mapping HTTPS port.
mappingHiddnsCmdPort int Manual mapping server port, use when upnpMappingMode=1.
hiddnsCmdPort int Auto mapping server port.
hiddnsRtspPort int Auto mapping streaming port.
domain string Device domain name.
deviceIp string Device WAN address.
subSerial string Device short serial No.
serial string Device long serial No.
deviceName string Device name.
  • Return Code
Return Code Return Information Description
200 操作成功 Request succeeded.
10001 请求参数错误 The parameter is empty or incorrect format.
10002 accessToken过期或异常 Access token exception or expired, and get access token again.
20002 设备不存在 Device does not exist.
20014 设备序列不正确 Illegal deviceSerial.
49999 数据异常 API call exception.

1.5. Set device DDNS domain

  • Function

    This API is used to set the device DDNS domain, including the shared device's DDNS domain.

  • Request Address

    {areaDomain}/api/lapp/ddns/setDomain

  • Request Method

    POST

  • Request Parameters

Parameter Name Type Description Required
accessToken String Access token obtained during authorization. Y
deviceSerial string Device serial No. Y
domain string Device domain, 6 to 32 characters are allowed, including lower-case letters, digits and dashes. The first character should be a letter, and the last character cannot be a dash. It can also be device serial No. When editing device domain rule, this field is required. Y
  • HTTP Request Report

POST /api/lapp/ddns/setDomain HTTP/1.1
Host: isgpopen.ezvizlife.com
Content-Type: application/x-www-form-urlencoded

accessToken=at.1b1cg2im66fnsj91090hvhbk43zmnkeh-22yjlfyvm4-0eyh0pl-alewra6g0&deviceSerial=519928976&domain=519928976
  • Return Data
{
  "code": "200",
  "msg": "操作成功!"
}
  • Return Filed
Field Type Description
code string Operation code.
msg string Operation message.
  • Return Code
Return Code Return Information Description
200 操作成功 Request succeeded.
2025 设备域名重复 The device domain name is duplicated.
10001 请求参数错误 The parameter is empty or incorrect format.
10002 accessToken过期或异常 Access token exception or expired, and get access token again.
49999 数据异常 API call exception.

1.6. Set device DDNS auto mapping

  • Function

    Set device DDNS auto mapping mode by single device.

  • Request Address

    {areaDomain}/api/lapp/ddns/mode/setAutomatic

  • Request Method

    POST

  • Request Parameters

Parameter Name Type Description Required
accessToken String Access token obtained during authorization. Y
deviceSerial string Device serial No. Y
  • HTTP Request Report

POST /api/lapp/ddns/mode/setAutomatic HTTP/1.1
Host: isgpopen.ezvizlife.com
Content-Type: application/x-www-form-urlencoded

accessToken=at.1b1cg2im66fnsj91090hvhbk43zmnkeh-22yjlfyvm4-0eyh0pl-alewra6g0&deviceSerial=519928976
  • Return Data
{
  "code": "200",
  "msg": "操作成功!"
}
  • Return Filed
Field Type Description
code string Operation code.
msg string Operation message.
  • Return Code
Return Code Return Information Description
200 操作成功 Request succeeded.
2025 设备域名重复 The device domain name is duplicated.
10001 请求参数错误 The parameter is empty or incorrect format.
10002 accessToken过期或异常 Access token exception or expired, and get access token again.
20018 该用户不拥有该设备 The user does not own the device.
49999 数据异常 API call exception.

1.7. Set device DDNS manual mapping

  • Function

    Set device DDNS manual mapping mode by single device.

  • Request Address

    {areaDomain}/api/lapp/ddns/mode/setManual

  • Request Method

    POST

  • Request Parameters

Parameter Name Type Description Required
accessToken String Access token obtained during authorization. Y
deviceSerial string Device serial No. Y
cmdPort int CMD (server) port. Y
httpPort int HTTP port. Y
  • HTTP Request Report

POST /api/lapp/ddns/mode/setManual HTTP/1.1
Host: isgpopen.ezvizlife.com
Content-Type: application/x-www-form-urlencoded

accessToken=at.1b1cg2im66fnsj91090hvhbk43zmnkeh-22yjlfyvm4-0eyh0pl-alewra6g0&deviceSerial=519928976&cmdPort=80&httpPort=81
  • Return Data
{
  "code": "200",
  "msg": "操作成功!"
}
  • Return Filed
Field Type Description
code string Operation code.
msg string Operation message.
  • Return Code
Return Code Return Information Description
200 操作成功 Request succeeded.
2025 设备域名重复 The device domain name is duplicated.
10001 请求参数错误 The parameter is empty or incorrect format.
10002 accessToken过期或异常 Access token exception or expired, and get access token again.
20018 该用户不拥有该设备 The user does not own the device.
49999 数据异常 API call exception.

1.8. Get DDNS information of all the devices in the account

  • Function

    Turn page (the maximum device number on each page is 50) to get the DDNS information of all the devices (including shared devices) in the current account.

  • Request Address

    {areaDomain}/api/lapp/ddns/list

  • Request Method

    POST

  • Request Parameters

Parameter Name Type Description Required
accessToken String Access token obtained during authorization. Y
pageSize int Page size, the default is 10, the maximum is 50. N
pageStart int Start page, start from 0. The default is 0. N
  • HTTP Request Report

POST /api/lapp/ddns/list HTTP/1.1
Host: isgpopen.ezvizlife.com
Content-Type: application/x-www-form-urlencoded

accessToken=at.1b1cg2im66fnsj91090hvhbk43zmnkeh-22yjlfyvm4-0eyh0pl-alewra6g0&pageSize=10&pageStart=0
  • Return Data
{
    "page":{
        "total":1,
        "page":0,
        "size":1
    },
    "data":[
        {
            "upnpMappingMode": 0,
            "domain": "test123456",
            "hiddnsHttpPort": 0,
            "mappingHiddnsHttpPort": 81,
            "hiddnsHttpsPort": 0,
            "hiddnsCmdPort": 0,
            "mappingHiddnsCmdPort": 80,
            "hiddnsRtspPort": 0,
            "deviceIp": "212.140.29.17",
            "subSerial": "704122511",
            "serial": "CS-C13-31WFR0120170112AACC704122511",
            "deviceName": "C2C(704122511)"
        }
    ],
    "code":"200",
    "msg":"操作成功!"
}
  • Return Filed
Field Type Description
data Array[HiddnsDeviceInfo] DDNS information list.
page Page Paging information.
code string Operation code.
msg string Operation message.

HiddnsDeviceInfo Object:

Field Type Description
upnpMappingMode int 1- Manual, 0- Auto.
mappingHiddnsHttpPort int Manual mapping HTTP port, use when upnpMappingMode=1.
hiddnsHttpPort int Auto mapping HTTP port.
hiddnsHttpsPort int Auto mapping HTTPS port.
mappingHiddnsCmdPort int Manual mapping server port, use when upnpMappingMode=1.
hiddnsCmdPort int Auto mapping server port.
hiddnsRtspPort int Auto mapping streaming port.
domain string Device domain name.
deviceIp string Device WAN address.
subSerial string Device short serial No.
serial string Device long serial No.
deviceName string Device name.

Page Object:

Field Type Description
total int Total number of records.
page int Start page, start from 0. The default is 0.
size int Page size, the default is 10, the maximum is 50.
  • Return Code
Return Code Return Information Description
200 操作成功 Request succeeded.
10001 请求参数错误 The parameter is empty or incorrect format.
10002 accessToken过期或异常 Access token exception or expired, and get access token again.
49999 数据异常 API call exception.

1.9. Share device DDNS information

  • Function

    Share DDNS information to other account by single device.

  • Request Address

    {areaDomain}/api/lapp/ddns/share

  • Request Method

    POST

  • Request Parameters

Parameter Name Type Description Required
accessToken String Access token obtained during authorization. Y
deviceSerial String Device serial No. Y
account string Account to share. It can be email address, mobile phone number (contains country code) or not full digital user name. Y
  • HTTP Request Report

POST /api/lapp/ddns/share HTTP/1.1
Host: isgpopen.ezvizlife.com
Content-Type: application/x-www-form-urlencoded

accessToken=at.1b1cg2im66fnsj91090hvhbk43zmnkeh-22yjlfyvm4-0eyh0pl-alewra6g0&deviceSerial=519928976&account=following1998%40126.com
  • Return Data
{
  "code": "200",
  "msg": "操作成功!"
}
  • Return Filed
Field Type Description
code string Operation code.
msg string Operation message.
  • Return Code
Return Code Return Information Description
200 操作成功 Request succeeded.
10001 请求参数错误 The parameter is empty or incorrect format.
10002 accessToken过期或异常 Access token exception or expired, and get access token again.
10005 appKey异常
20115 设备不允许分享给自己 The device is not allowed to share with yourself.
20116 分享已存在 Share already exists. The device has been shared under the friend account.
20117 好友跨区域 Friends across regions.
20118 分享超过限制 Share over limit.
49999 数据异常 API call exception.

1.10. Add Device

  • Function

    Add device to this account.

  • Request Address

    {areaDomain}/api/lapp/device/add

  • Request Method

    POST

  • Request Parameters

Parameter Name Type Description Required
accessToken String Access token obtained during authorization. Y
deviceSerial String Device serial No. Y
validateCode string The device verification code: six upper cases in the device body. Y
  • HTTP Request Report

POST /api/lapp/device/add HTTP/1.1
Host: isgpopen.ezvizlife.com
Content-Type: application/x-www-form-urlencoded

accessToken=at.20h863523v1zfck75qgmwhoy7vl2teqp&deviceSerial=427734888&validateCode=ABCDEF
  • Return Data
{
  "code": "200",
  "msg": "操作成功!"
}
  • Return Filed
Field Type Description
code string Operation code.
msg string Operation message.
  • Return Code
Return Code Return Information Description
200 操作成功 Request succeeded.
10001 请求参数错误 The parameter is empty or incorrect format.
10002 accessToken过期或异常 Access token exception or expired, and get access token again.
10005 appKey异常 App is frozen, appkey exception.
20002 设备不存在 Device does not exist. It means the device has not registered to Ezviz Cloud.
20007 设备不在线 Device is offline. Check whether the device is online.
20010 设备验证码错误 Device verification code error. Check whether the device verification code is correct.
20011 设备添加失败 Adding device failed. Check whether the network is connected.
20013 设备已被别人添加 Device has been added by others. The device has been added by other account.
20014 deviceSerial不合法 Illegal deviceSerial.
20017 设备已被自己添加 Device has been added by yourself. The device has been added by this account.
49999 数据异常 Data exception. Calling API call exception.

1.11. Get DDNS information of all the shared devices in the account

  • Function

    Turn page (the maximum device number on each page is 50) to get the DDNS information of all the shared devices in the current account.

  • Request Address

    {areaDomain}/api/lapp/ddns/share/list

  • Request Method

    POST

  • Request Parameters

Parameter Name Type Description Required
accessToken String Access token obtained during authorization. Y
pageSize int Page size, the default is 10, the maximum is 50. N
pageStart int Start page, start from 0. The default is 0. N
  • HTTP Request Report

POST /api/lapp/ddns/share/list HTTP/1.1
Host: isgpopen.ezvizlife.com
Content-Type: application/x-www-form-urlencoded

accessToken=at.1b1cg2im66fnsj91090hvhbk43zmnkeh-22yjlfyvm4-0eyh0pl-alewra6g0&pageSize=10&pageStart=0
  • Return Data
{
    "page":{
        "total":1,
        "page":0,
        "size":1
    },
    "data":[
        {
            "upnpMappingMode": 0,
            "domain": "test123456",
            "hiddnsHttpPort": 0,
            "mappingHiddnsHttpPort": 81,
            "hiddnsHttpsPort": 0,
            "hiddnsCmdPort": 0,
            "mappingHiddnsCmdPort": 80,
            "hiddnsRtspPort": 0,
            "deviceIp": "212.140.29.17",
            "subSerial": "704122511",
            "serial": "CS-C13-31WFR0120170112AACC704122511",
            "deviceName": "C2C(704122511)"
        }
    ],
    "code":"200",
    "msg":"操作成功!"
}
  • Return Filed
Field Type Description
data Array[HiddnsDeviceInfo] DDNS information list.
page Page Paging information.
code string Operation code.
msg string Operation message.

HiddnsDeviceInfo Object:

Field Type Description
upnpMappingMode int 1- Manual, 0- Auto.
mappingHiddnsHttpPort int Manual mapping HTTP port, use when upnpMappingMode=1.
hiddnsHttpPort int Auto mapping HTTP port.
hiddnsHttpsPort int Auto mapping HTTPS port.
mappingHiddnsCmdPort int Manual mapping server port, use when upnpMappingMode=1.
hiddnsCmdPort int Auto mapping server port.
hiddnsRtspPort int Auto mapping streaming port.
domain string Device domain name.
deviceIp string Device WAN address.
subSerial string Device short serial No.
serial string Device long serial No.
deviceName string Device name.

Page Object:

Field Type Description
total int Total number of records.
page int Start page, start from 0. The default is 0.
size int Page size, the default is 10, the maximum is 50.
  • Return Code
Return Code Return Information Description
200 操作成功 Request succeeded.
10001 请求参数错误 The parameter is empty or incorrect format.
10002 accessToken过期或异常 Access token exception or expired, and get access token again.
49999 数据异常 API call exception.

1.12. Get area list of all the nations

  • Function

    Get area list of all the nations.

  • Request Address

    https://open.ezvizlife.com/api/lapp/area/list

  • Request Method

    GET, POST

  • HTTP Request Report

GET /api/lapp/area/list HTTP/1.1
Host: open.ezvizlife.com
  • Return Data
{
    "data": [
        {
            "id": 101,
            "name": "Andorra",
            "region": "Europe",
            "telephoneCode": 376
        },
        {
            "id": 102,
            "name": "Austria",
            "region": "Europe",
            "telephoneCode": 43
        }
    ],
    "code": "200",
    "msg":"操作成功!"
}
  • Return Filed
Field Type Description
id int Area ID.
name string Area name.
region string State.
telephoneCode int Country phone code.

results matching ""

    No results matching ""