tencent cloud

Feedback

Create a Room

Last updated: 2024-12-03 17:04:40

    Feature Overview

    App admin can create a room through this interface.

    API Calling Description

    Sample request URL

    https://xxxxxx/v4/live_engine_http_srv/create_room?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/create_room
    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 admin account. For specific operations, see 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
    {
    "RoomInfo":{
    "RoomId":"live-room",
    "RoomType":"Live",
    "RoomName":"live name",
    "Owner_Account":"administrator",
    "MaxMemberCount":400,
    "CoverURL":"cover url",
    "IsMessageDisabled":true,
    "Category":[1, 2, 3],
    "IsPublicVisible": true,
    "IsSeatEnabled": true,
    "TakeSeatMode":"ApplyToTake",
    "MaxSeatCount":8,
    "ActivityStatus":1
    }
    }

    Request packet fields

    Field
    Type
    Attribute
    Description
    RoomId
    String
    Mandatory
    Room ID, up to 48 bytes
    RoomName
    String
    Optional
    Room Name, defaults to Room ID, up to 100 bytes
    RoomType
    String
    Mandatory
    Room Type: Live (Live Room)
    Owner_Account
    String
    Optional
    Host ID (must be an imported account), defaults to the User ID of the API caller
    MaxMemberCount
    Integer
    Optional
    Maximum number of room members, Default Setting: Upper limit of paid package, for example, the Trial Version is 20, if you Upgrade Package, you need to Modify room information to modify this field
    CoverURL
    String
    Optional
    Room cover,Maximum 200 bytes
    IsMessageDisabled
    Bool
    Optional
    Mute all audio, Default false
    Category
    Array
    Optional
    Room Type Indicator, can be used as a room type identifier by services, such as Game, Music, etc,Supports up to three.
    IsPublicVisible
    Bool
    Optional
    Room Public Indicator
    IsSeatEnabled
    Bool
    Optional
    Support for microphone positions, default is not supported
    TakeSeatMode
    String
    Optional
    When using microphone position capability, you need to fill in the microphone mode, FreeToTake (free to take the mic), ApplyToTake (apply to take the mic)
    MaxSeatCount
    Integer
    Optional
    Maximum number of microphone positions, when using the microphone position capability, defaults to package limit
    ActivityStatus
    Integer
    Optional
    Live room active status: user-defined Definition tag
    Note:
    After the live streaming, users need to manually call the Dissolve Room API to end the meeting.
    If the Dissolve Room interface is not manually invoked, the backend will attempt to recycle the room 6 hours after the meeting ends, provided there are no members left in the room.

    Sample response packets

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

    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
    RoomId
    String
    Room ID

    Error codes

    Unless a network error occurs (e.g., 502 error), the HTTP status code for this interface will always be 200. The actual error codes and messages are conveyed through ErrorCode and ErrorInfo in the response body. Common error codes (60000 to 79999) see Error Code documentation. 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
    100007
    No payment information, a package bundle needs to be purchased from the Console
    100010
    Room ID has been used, and the Operator is the Homeowner, it can be used directly
    100011
    Room ID is occupied by IM, you can change to another Room ID or dissolve the group first through the IM interface
    100012
    Creating rooms exceeds frequency limit; the same Room ID can only be created once per second

    Possible callbacks

    
    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