Get started
  • English
  • 简体中文
Official Site
Get started
  • English
  • 简体中文
Official Site
  • Get started
  • Concepts
  • Guides
  • Device capabilities & events
  • API reference
    • Public conventions
    • Development specification
    • accessToken: Get administrator token
    • API request example
    • Return codes
    • Interface call limits
    • Account docking
    • Device APIs
    • Device live broadcast
      • batchModifyLivePlan
      • bindDeviceLive
      • createDeviceFlvLive
      • createDeviceRecordHls
      • createDeviceRtmpLive
      • deleteDeviceFlvLive
      • deleteDeviceRtmpLive
      • getLiveStreamInfo
      • liveList
      • modifyLivePlan
      • modifyLivePlanStatus
      • queryDeviceFlvLive
      • queryDeviceRtmpLive
      • queryLiveStatus
      • unbindLive
    • Push configuration
    • Cloud storage service
    • Resource pool quota
    • Legacy APIs (deprecated)
  • SDK and tools
  • Solutions
  • Platform and support
On this page
Function details
Request address
Request format
Incoming parameter description
Request root fields
Sample input
Return data field description
Response root fields
Sample output
Error codes
Related

queryDeviceFlvLive (queryDeviceFlvLive: Query device FLV real-time live)

queryDeviceFlvLive: queryDeviceFlvLive: Query device FLV real-time live

Function details

Query the FLV real-time live URL for a device channel. Only persisted realTime bindings are returned; one-time playback URLs are not stored.

Request address

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

Request format

HTTP POST. JSON body layout: Request conventions. Sign with Signature.

Incoming parameter description

Parameter nameParameter typeRequired or notDefault valueLegal valueParameter description
tokenStringYesAdministrator accessToken
deviceIdStringYesDevice serial number
channelIdStringYesChannel ID

Request root fields

FieldTypeDescription
systemObjectAuth and version
idStringRequest ID
paramsObjectBusiness parameters; see table above

Sample input

{
 "system":{
 "ver":"1.0",
 "appId":"lcdxxxxxxxxx",
 "sign": "xjhCQBoJ9hRDsCjyDcHjtDNzRZ3ZJezcawsfWeiaoxU=",
 "time":1603366946,
 "nonce":"2e84717c-0f22-4424-8afe-19bab0d6d606"
 },
 "id":"051824b1-9655-4755-9cc2-adcc9ab5fef1",
 "params":{
 "deviceId":"TESTQWERXXXX",
 "channelId":"0",
 "token":"At_00000ad9e6e87f0142eb92e207aec46a"
 }
}

Return data field description

FieldTypeDescription
deviceIdStringDevice serial number
channelIdStringDevice channel number
flvStringFLV SD URL
flvHDStringFLV HD URL

Response root fields

FieldTypeDescription
resultObjectResult payload
idStringRequest ID

Sample output

{
 "result":{
 "msg":"The operation was successful.",
 "code":"0",
 "data":{
 "deviceId": "TESTQWERXXXX",
 "channelId": "0",
 "flv": "https://cmgw-vpc.lechange.com:8890/flv/LCO/QWERQWEQWSAXXXXXAS/0/1/20220425095816/214307ab858b63bsdhf8372sldjw8yr32.flv?proto=https",
 "flvHD": "https://cmgw-vpc.lechange.com:8890/flv/LCO/QWERQWEQWSAXXXXXAS/0/0/20220425095816/214307ab858b63bsdhf8372sldjw8yr32.flv?proto=https"
 }
 },
 "id":"051824b1-9655-4755-9cc2-adcc9ab5fef1"
}

Error codes

This method may return the codes below. See Return codes and Capability errors for the full catalog.

Gateway and auth (SN / TK / OP)

CodeMeaningNext step
SN1001Signature errorCheck sign per Development specification
TK1002Token invalid or expiredRefresh accessToken
OP1002Missing required parameterAdd required fields
OP1003Invalid parameterMatch this page’s parameter table
OP1009Permission deniedCheck token and device bind/share grants
OP1013Total call limit exceededReduce call rate
OP1014Daily per-interface limit exceededSee Interface call limits
DV1007Device offlineWait until the device is online

See Return codes · OP/SN/TK for the full catalog.

Sub-accounts (SUB)

CodeMeaningNext step
SUB1001–SUB1002Sub-account lacks API permissionUpdate policy via addPolicy
SUB1005Sub-account token expiredRefresh subAccountToken
SUB1006No device grant for sub-accountCheck Resource and device serial
SUB1008Sub-account not bound to appCreate and bind the sub-account first

See Return codes · SUB.

Device access and channels (DV10xx)

CodeMeaningNext step
DV1007Device offline or timeoutWait for the device to come online
DV1009Device busyRetry later
DV1012Insufficient share/grant permissionCheck sub-account Permission / Resource
DV1019Capability not supportedConfirm model and capability list
DV1020Channel offlineCheck channel status
DV1026Function not supportedUse another API or upgrade firmware
DV1028Not bound or channel missingVerify deviceId / channelId

See Return codes · DV.

Live binding (LV)

CodeMeaningNext step
LV1001Live already existsUnbind via unbindLive or use another source
:---:---:---
LV1002Live does not existCreate the live plan first
:---:---:---
LV1005Live info does not existVerify live id
:---:---:---
LV1006Same RTSP source can bind only once per dayRetry the next day
:---:---:---
LV1008Real-name verification requiredComplete profile in the Open Platform console
:---:---:---
LV1020Live is bound and cannot be deletedUnbind first
:---:---:---
OP1021Failed to get playback URLCheck live status and plan
:---:---:---
OP1022Cloud decode authorization requiredAuthorize in the app as described in the response

See Return codes · catalog.

Related

  • Development specification
  • API conventions
  • Module index
modifyLivePlanStatus
queryDeviceRtmpLive