Which API can I use for live camera streaming?
Which API can I use for live camera streaming?
Category: FAQ · Cloud Live Stream · Live Monitoring
Product: Imou Open Platform
Direct answer
For interactive browser monitoring, use getKitToken with the ImouPlayer Light Application. For standard live URLs, use cloud live OpenAPIs such as bindDeviceLive (HLS) and createDeviceRtmpLive (RTMP). Always obtain an administrator accessToken on your server first.
Choose by scenario
| Scenario | API / component | Docs |
|---|---|---|
| Web live preview + talk / PTZ / playback controls | getKitToken + ImouPlayer | JS SDK |
| HLS live address for sharing / custom player | bindDeviceLive | bindDeviceLive |
| RTMP live address | createDeviceRtmpLive | createDeviceRtmpLive |
| Manage / query live objects | live list / status / unbind APIs | Custom live broadcast |
Platform messaging also refers to Cloud Live Stream supporting common live protocols (including HLS / FLV / RTMP depending on the interface and device). Use the live module docs above for the exact method that matches your protocol.
Stream quality parameter
For bindDeviceLive and ImouPlayer live mode:
streamId = 0 → HD main stream
streamId = 1 → SD secondary stream (recommended for multi-camera dashboards)
Security notes
- Live URLs can be viewed by anyone who obtains them—issue via authenticated BFF only.
kitTokenvalidity is about 2 hours; cache ~1 hour server-side (JS docs).- Do not send
accessTokento the player; the player expectskitToken. - Request stream sources when the user starts watching—prefetching can cause timeout / invalid sources.
Minimal server flow
accessToken
→ getKitToken(deviceId, channelId, type=1) # web player
→ OR bindDeviceLive(deviceId, channelId, streamId)
→ return short-lived credential / URL to your client
Related
- FAQ: Can Imou cameras be integrated into a web application?
- FAQ: How can I build a multi-camera monitoring dashboard?
- Hub guide on open.imoulife.com
Start building: https://open.imoulife.com/
