On this page

DescribePlayers

2026-04-30
POST

https://cloud-player-api.zego.im/

Call this API to query all cloud player task lists under the AppID, including all statuses such as created, running, destroyed, etc.; or query the task information of a specified cloud player.

Note
Call frequency limit: 20 times/second

Request

Query Parameters

    Action stringrequired

    Possible values: [DescribePlayers]

    API prototype parameter

    https://cloud-player-api.zego.im?Action=DescribePlayers

    AppId uint32required

    💡Common parameter. Application Id, a unique user credential assigned by ZEGOCLOUD. Can be obtained from ZEGOCLOUD Console.

    SignatureNonce stringrequired

    💡Common parameter. 16-digit hexadecimal random string (hex encoding of 8-byte random number). For the generation algorithm, please refer to Signature Example.

    Timestamp int64required

    💡Common parameter. Current Unix timestamp, unit is seconds. For the generation algorithm, please refer to Signature Example, a maximum error of 10 minutes is allowed.

    SignatureVersion stringrequired

    Possible values: [2.0]

    Default value: 2.0

    💡Common parameter. Signature version number.

    Signature stringrequired

    💡Common parameter. Signature, used to verify the legitimacy of the request. Please refer to Signature Mechanism for generation.

Body

required
    RoomId string

    Possible values: <= 128 characters

    Query the specified room ID, with a length within 128 bytes. If RoomId is filled in, please ensure that the RoomId exists, otherwise the query result may be empty.

    Warning

    • When neither RoomId nor PlayerId is filled in, calling this API will return all cloud player task lists under the AppId.
    • When RoomId is filled in and PlayerId is not filled in, calling this API will return all cloud player task lists in the room RoomId under the AppId.
    • When PlayerId is filled in (RoomId can be filled in or not), calling this API will return the cloud player task information corresponding to the PlayerId.
    PlayerId string

    Cloud player unique identifier ID, returned by CreatePlayer. If PlayerId is filled in, please ensure that the PlayerId exists, otherwise the query result may be empty.

    Warning

    • When neither RoomId nor PlayerId is filled in, calling this API will return all cloud player task lists under the AppId.
    • When RoomId is filled in and PlayerId is not filled in, calling this API will return all cloud player task lists in the room RoomId under the AppId.
    • When PlayerId is filled in (RoomId can be filled in or not), calling this API will return the cloud player task information corresponding to the PlayerId.
    PageSize number

    Page size, value range (0, 50], default is 50 per page, indicating the maximum number of task lists returned by calling this API once. For task lists exceeding the PageSize value, you need to call this API again for query based on the NextPageToken (query task list pagination starting position) value in the return result of the previous call to this API.

    For example, if there are currently 123 cloud player tasks and PageSize is 50, when calling this API for query:

    • The first time calling this API, pass empty for the input parameter PageToken, query player tasks 1 to 50; assume the NextPageToken value in the return result is "pagetoken1".
    • The second time calling this API, set the input parameter PageToken to "pagetoken1", query player tasks 51 to 100; assume the NextPageToken value in the return result is "pagetoken2".
    • The third time calling this API, set the input parameter PageToken to "pagetoken2", query player tasks 101 to 123; query completed, NextPageToken in the return result is empty.
    PageToken string

    Query task list pagination starting position, when this parameter is not filled in, the first page of the queried task list is returned by default.

    Each time this API is called to initiate a request, NextPageToken will be returned in the response result, and developers need to determine whether the last page has been queried.

    Status number

    Possible values: [1, 2, 3, 4, 5, 6, 7, 8]

    Status of the cloud player, used to query the cloud player task list in a specific status. Supports the following values:

    • 1: Creating.
    • 2: Connecting to media resource.
    • 3: Waiting to play.
    • 4: Playing.
    • 5: Paused.
    • 6: Failed to connect to media resource.
    • 7: Playback ended.
    • 8: Destroyed.

Responses​

OK
Schema
    Code number

    Error code.

    The following only lists the return codes related to the API business logic. For the complete return codes, please refer to Global Return Codes.

    Return CodeDescriptionHandling Suggestion
    0Success.-
    100000004Signature expired.Please regenerate the signature.
    100000005Signature error.Please confirm whether the parameters for generating the signature are correct.
    350006001API request frequency exceeds the limit.Please confirm the QPS limit of the corresponding API and reduce the request frequency.
    350006002Gateway verification failed.Please contact ZEGOCLOUD Technical Support for assistance.
    350006003Invalid input parameter.Please adjust the value of the corresponding parameter according to the Message prompt.
    350006006Service not activated.Please contact ZEGOCLOUD Technical Support to activate the service permission.
    350010000System error.Please contact ZEGOCLOUD Technical Support for assistance.
    Message string

    Error description.

    RequestId string

    Request ID.

    Data object
    Returned specific information.
    TotalSize number

    Total number of cloud player tasks queried.

    NextPageToken string

    Page number of the next page of this query. When NextPageToken is empty, it indicates that the last page has been queried.

    Players object[]
    Queried cloud player task information.
  • Array[
  • PlayerId string

    Cloud player unique identifier ID.

    RoomId string

    Room ID.

    StreamId string

    Stream ID published to the specified room.

    CreateTime number

    Player creation time, Unix timestamp, unit is seconds.

    PlayTime number

    Time when media resource playback started, Unix timestamp, unit is seconds.

    PlayerName string

    Name of the cloud player.

    StreamUrl string

    Address of the media resource being played.

    Status number

    Possible values: [1, 2, 3, 4, 5, 6, 7, 8]

    Status of the cloud player.

    • 1: Creating.
    • 2: Connecting to media resource.
    • 3: Waiting to play.
    • 4: Playing.
    • 5: Paused.
    • 6: Failed to connect to media resource.
    • 7: Playback ended.
    • 8: Destroyed.
    DestroyReason number

    Possible values: [1, 2, 3, 4, 5]

    Reason for cloud player destruction.

    • 1: Actively destroyed by calling the DeletePlayer API.
    • 2: Idle state duration exceeded MaxIdleTime.
    • 3: Media resource playback has ended.
    • 4: Stream publishing failed.
    • 5: Failed to enter the room or was kicked out of the room.
    StreamUrlList string[]

    List of media resources being played.

    PlayIndex number

    Index of the currently playing media resource. Returns 0 after the player is destroyed.

  • ]

Previous

Destroy a cloud player

Next

Create an upload task

On this page

Back to top