Integrate a camera
Integrate a camera
Scope and prerequisites
Connect a supported Imou camera to your web app, mobile app, or SaaS. Create an app first, then bind the device to the developer account. A device that only shows up in the consumer app is invisible to OpenAPI.
Use the administrator accessToken only on your server. Do not put the AppSecret in a browser or an install package.
Steps
- Create an app at open.imoulife.com and store the
AppIdandAppSecret. - Bind the camera to the developer account. See Add a device.
- Call accessToken from the server and cache the token.
- Sync devices with Paged device detail.
pageSizeis 1–50. Confirm one device is listed before you build a multi-camera wall. - Pick a playback path below.
Client implementations
- Web / H5: exchange
accessTokenfor akitTokenon the server, then use ImouPlayer in the browser. Do not passaccessTokento the player. See Integrate on the web. - Android / iOS: use OpenSDK. Packages are in Downloads.
- A shareable live address: HLS uses bindDeviceLive. RTMP uses createDeviceRtmpLive. See Cloud live from an AppId.
- A SaaS inventory: store
listDeviceDetailsByPageresults in your tenant and site model. Cloud permissions do not replace your tenant isolation. See Integrate in a SaaS.
For a wall of cameras, default streamId to 1 (SD). Use 0 (HD) only when the user opens a single camera. Do not prefetch every address before a cell is visible, and destroy the player when the cell closes.
