Box610初步 📅 2026/7/7 8:29:42 华为 CloudLink Box610 HTTP API CURL 完整示例前置准备Box610 IP192.168.2.100API账号api密码Api123456Web后台系统配置→API用户设置ZLM 流地址rtsp://192.168.2.200:8554/live/stream001传输强制TCP适配会议终端1. 登录接口获取 Ticket鉴权令牌curl--location--requestPOSThttp://192.168.2.100/api/v1/auth/login\--headerContent-Type: application/json\--data-raw{ username: api, password: Api123456 }成功返回示例{code:0,msg:success,data:{ticket:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9xxxxxx}}后续所有接口请求头带上Authorization: Bearer {ticket}2. 添加ZLM RTSP外部视频源把上面拿到的 ticket 替换到下面脚本中curl--location--requestPOSThttp://192.168.2.100/api/v1/video/source/add\--headerAuthorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9xxxxxx\--headerContent-Type: application/json\--data-raw{ name: ZLM摄像头001, protocol: rtsp, url: rtsp://192.168.2.200:8554/live/stream001, transport: tcp, username: , password: }参数说明transporttcp 必选解决卡顿丢包若ZLM开启RTSP鉴权填入对应 username/password3. 获取所有已添加视频源列表拿到源IDcurl--location--requestGEThttp://192.168.2.100/api/v1/video/source/list\--headerAuthorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9xxxxxx返回会包含每条流的sourceId切换画面需要用到该ID。4. 切换主画面为ZLM流核心上屏接口替换sourceId为上一步查询到的IDcurl--location--requestPOSThttp://192.168.2.100/api/v1/video/input/switch\--headerAuthorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9xxxxxx\--headerContent-Type: application/json\--data-raw{ type: main, sourceId: 1001 }type:main主画面sub辅画面双流5. 常用辅助接口5.1 获取终端设备状态curl--location--requestGEThttp://192.168.2.100/api/v1/device/status\--headerAuthorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9xxxxxx5.2 删除无效视频源curl--location--requestPOSThttp://192.168.2.100/api/v1/video/source/del\--headerAuthorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9xxxxxx\--headerContent-Type: application/json\--data-raw{ sourceId: 1001 }关键排错要点返回401未授权API用户会话模式改为「兼容模式」ticket过期需重新登录获取RTSP拉流黑屏ZLM config.ini 开启rtsp_tcp1视频H264/H265、音频AAC不支持OPUS跨网段不通Box610防火墙放行80端口服务器与终端路由互通配套ZLM优化配置config.ini[rtsp] rtsp_tcp1 rtsp_low_delay1