ApsaraVideo Live API Call FAQ

Updated at:

This topic provides solutions for common issues that you might encounter when calling the ApsaraVideo Live OpenAPI.

Why do query API operations return empty data?

Query API operations such as DescribeLiveUserStreamMetricData require the StartTime and EndTime parameters in UTC time (UTC+8 minus 8 hours), in a format such as 2026-07-01T16:00:00Z. If you pass UTC+8 time or an invalid format, the operation returns empty results. Also confirm that the domain and the time range that you query actually contain business data.

Conversion example: To query full-day data for 2026-07-02 in UTC+8, set StartTime=2026-07-01T16:00:00Z and EndTime=2026-07-02T15:59:59Z. If you set 2026-07-02T00:00:00Z to 2026-07-02T23:59:59Z, you actually query 08:00 on 07-02 to 07:59 on 07-03 in UTC+8, which does not match the intended period.

Other notes: The domain, AppName, and StreamName must exactly match the actual stream ingest configuration (case-sensitive). Monitoring data has a latency of 5 to 10 minutes, so a period that has just ended might not have data yet.

What are the limits on live stream preload tasks?

When you call SetLiveStreamPreloadTasks to configure live stream preloading, note the following limits: you can submit a maximum of 100 URL entries per request, and each streaming URL must use the RTMP or FLV protocol. An HLS (M3U8) streaming URL is not supported, and a submitted M3U8 address does not take effect.

Why doesn't DescribeLiveMessageGroup return OnlineUserCounts?

DescribeLiveMessageGroup returns the OnlineUserCounts field only when the message group exists: the field returns 0 when no users are in the group; after all users leave, the group no longer exists and the field is not returned. Handle the missing field in your application logic.

Why do API calls return AccessPolicyDenied or cross-account queries fail?

If API calls that use AK/SK credentials return AccessPolicyDenied, an IP-based access control policy is usually configured on the account and the request source IP address is outside the allowed range. Adjust the access control policy. In addition, cross-account queries for resource information such as domain details are not supported. Use the account that owns the resource, or submit a ticket.

Which stream ingest protocols are supported, and which are not?

Three protocols are supported for stream ingest: RTMP, ARTC, and SRT. RTSP and GB28181 are not supported. Usage notes:

  • For SRT stream ingest, first enable the protocol switch in the console, and then use the URL generator to generate an ingest URL.

  • WHIP stream ingest has built-in NAT traversal, so you do not need to manually configure a STUN or TURN server. Open UDP ports 1106 and 443.

  • For devices that use protocols such as RTSP or GB28181, transcode the stream to RTMP or SRT on your side before you start stream ingest.

Why does the pull-to-push API return 400, and how do I pass the source URL parameter?

Pull-to-push API operations such as AddLiveStreamTranscode require the source URL parameter, such as SourceUrls, in array format, for example ["rtmp://example.com/app/stream"]. The following formats all return a 400 parameter error: passing a plain string; passing an index-like placeholder string such as ["SourceUrls.1"]; passing an array that is not serialized. When you use a software development kit (SDK), pass a string array object directly. When you use OpenAPI Explorer, enter the value as an array type.

Can I obtain the originating IP addresses of viewers who are pulling a stream?

No. Online user API operations such as DescribeLiveStreamOnlineUserNum return aggregated statistics. In addition, stream pulling requests are forwarded by the content delivery network, so the operation can see only edge node addresses instead of the originating IP addresses of viewers.

Alternatives: Enable log delivery or download access logs, and then analyze the client IP addresses in the logs on your side. If you need statistics per user, add custom business parameters to the playback URL and collect the statistics on your own server.