tencent cloud

Feedback

Querying the Session Status

Last updated: 2024-07-19 10:02:16
    It is used to query the current status of a specified session.

    Calling Protocol

    HTTPS + JSON
    POST /v2/ivh/sessionmanager/sessionmanagerservice/statsession
    Header Content-Type: application/json;charset=utf-8

    Request Parameters

    Parameter name
    Required
    Type
    Description
    ReqId
    Yes
    String
    Unique identifier for each request, a 32-character UUID.
    SessionId
    Yes
    String
    Unique identifier for the session.

    Response Parameter

    Parameter name
    Required
    Type
    Description
    ReqId
    Yes
    String
    Unique identifier for a single request.
    SessionStatus
    Yes
    int
    Stream status.1: in progress; 2: closed; 3: preparing; 4: stream creation failed
    PlayStreamAddr
    No
    string
    Streaming playback address
    SpeakStatus
    No
    string
    Status of the digital human. Initial: initial state. WaitingTextStart: waiting for text broadcast to start. TextStart: text broadcasting. WaitingTextOver: waiting for text broadcast to finish. TextOver: text broadcast finished. WaitingAudioStart: waiting for audio broadcast to start. AudioStart: audio broadcast started. WaitingAudioOver: waiting for audio broadcast to finish. AudioOver: audio broadcast finished. Error: drive error (same as TextOver and AudioOver, indicating the end state of a drive). It only denotes the failure of the most recent drive command and does not affect the ability to continue sending drive commands.
    IsSessionStarted
    Yes
    bool
    It indicates whether the session has started. Drive instructions can only be sent when the session is active.
    Note:
    When false is returned, you need to call the Start Session API to initiate.
    ErrorCode
    Yes
    int
    The error code corresponding to the current status; 0 indicates normal operation. See Section 7.2 for the list of error codes.
    ErrorMessage
    No
    string
    The error message corresponding to the current status.

    Request Sample

    {
    "Header": {},
    "Payload": {
    "ReqId": "d7aa08da33dd4a662ad5be508c5b77cf",
    "SessionId": "m123"
    }
    }

    Response Sample

    {
    "Header": {
    "Code": 0,
    "Message": "",
    "RequestID": "123",
    },
    "Payload": {
    "ReqId": "d7aa08da33dd4a662ad5be508c5b77cf",
    "SessionStatus": 1,
    "PlayStreamAddr": "rtmp://live.qq.com/live/m789",
    "SpeakStatus": "TextOver",
    "IsSessionStarted": true,
    "ErrorCode": 0,
    "ErrorMessage": ""
    }
    }
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support