tencent cloud

Feedback

After a Room Is Destroyed

Last updated: 2024-09-24 15:07:19

    Feature Overview

    The app backend can use this callback to monitor room dissolution in real-time, including real-time recording of room dissolution (e.g., logging or synchronization with other systems).

    Notes

    To enable this callback, you must configure the callback URL and toggle on the corresponding protocol. For more information on the configuration method, see Third party callback configuration documentation.
    During this callback, the Live backend initiates an HTTP POST request to the app backend.
    After receiving the callback request, the app backend must check whether the SDKAppID contained in the request URL is consistent with its own SDKAppID.

    Scenarios that may trigger this callback

    The app user successfully dissolved the room using the client
    The app administrator successfully dissolved the room using the REST API

    Callback Trigger Time

    After the room is successfully destroyed.

    API description

    Sample request URL

    In the following example, the callback URL configured in the app is https://www.example.com. Example:
    https://www.example.com?SdkAppid=$SDKAppID&CallbackCommand=$CallbackCommand&contenttype=json&ClientIP=$ClientIP&OptPlatform=$OptPlatform

    Request parameters

    Parameter
    Description
    https
    The request protocol is HTTPS, and the request method is POST
    www.example.com
    Callback URL
    SdkAppid
    SDKAppID assigned by the Chat console when an application is created
    CallbackCommand
    Fixed as Live.CallbackAfterDestroyRoom
    contenttype
    Fixed value: JSON
    ClientIP
    Client IP, such as 127.0.0.1
    OptPlatform
    Client Platform, for value reference see Webhook Overview: Callback Protocol for the meaning of the OptPlatform parameter

    Sample request packets

    {
    "CallbackCommand":"Live.CallbackAfterDestroyRoom",
    "Operator_Account":"admin",
    "RoomId":"tandy-test-rest",
    "EventType":"DestroyByUser" //"DestroyByUser", "DestroyBySystem" are divided into user-initiated dissolution and system-automatic dissolution when no one is in the room
    "EventTime":1703589922780
    }

    Request packet fields

    Field
    Type
    Description
    CallbackCommand
    String
    Callback command
    Operator_Account
    String
    UserID of the operator initiating the room destruction request
    RoomId
    String
    Room ID
    EventType
    String
    Dissolution Type: Divided into user-initiated dissolution (DestroyByUser) and system-automatic dissolution (DestroyBySystem)
    EventTime
    Integer
    Event trigger timestamp in milliseconds

    Response packet example

    A callback response packet is sent after the app backend synchronizes the data.
    {
    "ActionStatus": "OK",
    "ErrorInfo": "",
    "ErrorCode": 0 // Ignore callback result
    }

    Response Packet Field Description

    Field
    Type
    Attribute
    Description
    ActionStatus
    String
    Mandatory
    The result of the request process: OK indicates success; FAIL indicates failure
    ErrorCode
    Integer
    Mandatory
    Error Code, here 0 means to ignore the response result
    ErrorInfo
    String
    Mandatory
    Error message

    Reference

    REST API:Dissolve Room
    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