tencent cloud

Feedback

Set Custom Room Information

Last updated: 2024-09-11 17:28:23

    Feature Overview

    App administrator can set room metadata through this interface.

    API Calling Description

    Sample request URL

    https://xxxxxx/v4/live_engine_http_srv/set_room_metadata?
    sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json

    Request parameters

    The table below only lists the parameters modified when this interface is called. For more details on other parameters, please refer to RESTful API Overview.
    Parameter
    Description
    xxxxxx
    The reserved domain for the country/region where the SDKAppID is located:
    Others in China: console.tim.qq.com
    Singapore : adminapisgp.im.qcloud.com
    v4/live_engine_http_srv/set_room_metadata
    Request API
    sdkappid
    SDKAppID assigned by the Chat console when an app is created
    identifier
    Must be an App admin account. For more details, see App Admin
    usersig
    The Signature generated by the App Administrator account, for detailed operations, please refer to Generating UserSig
    random
    A random 32-bit unsigned integer ranging from 0 to 4294967295
    contenttype
    Request format fixed value: json

    Maximum calling frequency

    200 queries/sec.

    Sample request packets

    Basic Form
    {
    "RoomId": "live-room",
    "Metadata": [
    {
    "Key":"key1", //If the key exists, it will be updated; otherwise, it will be added
    "Value":"value1"
    },
    {
    "Key":"key2",
    "Value":"value2"
    }
    ]
    }

    Request packet fields

    Field
    Type
    Attribute
    Description
    RoomId
    String
    Mandatory
    Room ID
    Metadata
    Array
    Mandatory
    Room metadata list,the length of a single key does not exceed 50 bytes, and the value length does not surpass 2K

    Sample response packets

    Basic Form
    {
    "ActionStatus": "OK",
    "ErrorInfo": "",
    "ErrorCode": 0,
    "RequestId": "Id-8c9858f01e954611ae2d4c1b1ed7d583-O-Seq-52720"
    }

    Response Packet Field Description

    Field
    Type
    Description
    ActionStatus
    String
    The result of the request process: OK indicates success; FAIL indicates failure
    ErrorCode
    Integer
    Error code. 0: success; other values: failure
    ErrorInfo
    String
    Error message
    RequestId
    String
    Unique Request ID is returned with each request and required to provide this RequestId when locating issues

    Error codes

    Unless a network error occurs (e.g., 502 Error), the HTTP return code for this interface will always be 200. The actual error code and error information are indicated in the response payload by ErrorCode and ErrorInfo. Common Error Codes (60000 to 79999) can be found in the Error Codes document. The private error codes for this API are as follows:
    Error code
    Description
    100001
    Internal server error, please retry
    100002
    Invalid parameter, please check the request for correctness based on the error description
    100003
    Room ID already exists, please choose another Room ID
    100006
    No permission to operate room metadata
    100007
    No payment information, a package bundle needs to be purchased from the Console
    100500
    The number of keys for room metadata exceeds the upper limit of 10
    100501
    The value of a single key for room metadata exceeds the upper limit of 2KB
    100502
    The total size of values for all keys of room metadata exceeds the upper limit of 16KB
    100503
    None of the specified keys are valid when deleting room metadata
    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