tencent cloud

피드백

Modifying the Profile of a Group

마지막 업데이트 시간:2024-07-16 11:15:59

    Feature Overview

    This API is used by the app admin to modify the profile of a specified group.

    API Calling Description

    Applicable group types

    Group Type ID
    RESTful API Support
    Private
    Yes. Same as work groups (Work) in the new version.
    Public
    Yes
    ChatRoom
    Yes. Same as meeting groups (Meeting) in the new version.
    AVChatRoom
    Yes
    Community
    Yes
    These are the preset group types in Chat. For more information, see Group System.

    Sample request URL

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

    Request parameters

    The following table describes the modified parameters when this API is called. For other parameters, see RESTful API Overview.
    Parameter
    Description
    xxxxxx
    Domain name corresponding to the country/region where your SDKAppID is located.
    China: console.tim.qq.com
    Singapore: adminapisgp.im.qcloud.com
    Seoul: adminapikr.im.qcloud.com
    Frankfurt: adminapiger.im.qcloud.com
    Silicon Valley: adminapiusa.im.qcloud.com
    Jakarta: adminapiidn.im.qcloud.com
    v4/group_open_http_svc/modify_group_base_info
    Request API.
    sdkappid
    SDKAppID assigned by the Chat console when an app is created
    identifier
    App admin account. For more information, see the App Admin section in Login Authentication.
    usersig
    Signature generated by the app admin account. For details, see Generating UserSig.
    random
    A random 32-bit unsigned integer ranging from 0 to 4294967295.
    contenttype
    Request format, which should always be json.

    Maximum call frequency

    200 calls per second

    Sample request

    Modify basic group information Modify basic group information, such as the group name and group announcement.
    {
    "GroupId": "@TGS#1NVTZEAE4", // Group whose basic profile you want to modify (required)
    "Name": "NewName", // Group name (optional)
    "Introduction": "NewIntroduction", // Group introduction (optional)
    "Notification": "NewNotification", // Group notice (optional)
    "FaceUrl": "http://this.is.new.face.url", // Group profile photo (optional)
    "MaxMemberNum": 500, // Maximum number of group members (optional)
    "ApplyJoinOption": "NeedPermission", // Method for applying to join the group (optional)
    "MuteAllMember": "On" // Mutes all members (optional). "On": Enable, "Off": Disable
    }
    Set custom group information Set a group's custom field information. By default, custom information is not available and needs to be enabled in the Chat console. For details, see the description table for request packet fields.
    {
    "GroupId": "@TGS#1NVTZEAE4", // Group whose basic profile you want to modify (required)
    "AppDefinedData": [ // Custom field (optional)
    {
    "Key": "GroupTestData1", // Custom field key to be modified
    "Value": "NewData" // New value of the custom field
    }
    ]
    }
    Delete custom group information Delete a group's custom field information that you have set.
    {
    "GroupId": "@TGS#1NVTZEAE4", // Group whose basic profile you want to modify (required)
    "AppDefinedData": [ // Custom field (optional)
    {
    "Key": "GroupTestData2",
    "Value": "" // If this parameter is empty, the custom field is to be deleted.
    }
    ]
    }
    ALL IN ONE
    {
    "GroupId": "@TGS#2J4SZEAEL", // Group whose basic profile you want to modify (required)
    "Name": "NewName", // Group name (optional)
    "Introduction": "NewIntroduction", // Group introduction (optional)
    "Notification": "NewNotification", // Group notice (optional)
    "FaceUrl": "http://this.is.new.face.url", // Group profile photo (optional)
    "MaxMemberNum": 500, // Maximum number of group members (optional)
    "ApplyJoinOption": "NeedPermission", // Method for applying to join the group (optional)
    "MuteAllMember": "On", // Mutes all members, which is optional. `On`: Enable. `Off`: Disable
    "AppDefinedData": [ // Custom field (optional)
    {
    "Key": "GroupTestData1", // Custom field key to be modified
    "Value": "NewData" // New value of the custom field
    },
    {
    "Key": "GroupTestData2",
    "Value": "" // If this parameter is empty, the custom field is to be deleted.
    }
    ]
    }

    Request fields

    Field
    Type
    Required
    Description
    GroupId
    String
    Required
    ID of the group whose basic information you want to modify.
    Name
    String
    Optional
    The maximum length is 30 bytes. This field is UTF-8-encoded, and one Chinese character occupies three bytes.
    Introduction
    String
    Optional
    The maximum length is 240 bytes. This field is UTF-8-encoded, and one Chinese character occupies three bytes.
    Notification
    String
    Optional
    The maximum length is 300 bytes. This field is UTF-8-encoded, and one Chinese character occupies three bytes.
    FaceUrl
    String
    Optional
    URL of the group profile photo, whose maximum length is 100 bytes.
    MaxMemberNum
    Integer
    No
    Maximum number of group members
    For work groups (Work), public groups (Public), meeting groups (Meeting), and communities, see the upper limit on the number of group members in Group System.
    For audio-video groups (AVChatRoom), this field is invalid and doesn't need to be specified.
    ApplyJoinOption
    String
    Optional
    Method for handling requests to join the group. Valid values: FreeAccess, NeedPermission, and DisableApply. Community groups currently do not support this field.
    AppDefinedData
    Array
    Optional
    By default, this field is not available. To learn how to enable group-level custom fields, see Custom Fields.
    MuteAllMember
    String
    Optional
    Mutes all members in a group and allows only the group admin, group owner, and system admin to speak.
    InviteJoinOption
    String
    Optional
    Method for handling invitations to join the group. Valid values: FreeAccess (directly inviting users to the group without approval and other operations), NeedPermission (requiring approval from the group admin or owner), and DisableInvite (not supporting SDK invitations to the group). This option is not supported by the AVChatRoom group type.
    From_Account
    String
    Optional
    Operator source account, optional. If this field is not filled in, the operator who modifies the group information is the App admin account used when calling this interface. In addition, the App can also "forge" the operator who modifies the group information through this field to implement some special functional requirements. If you specify this field, you must ensure that the account in the field exists.
    EnablePermission
    Integer
    Optional
    Only communities that support topics can set this field.
    Whether to enable the permission group as the basis for permission judgement:
    0: Disable
    1: Enable
    DefaultPermission
    Integer
    Optional
    Only groups that enable the permission group as the basis for permission judgement can set this field.
    The default permissions of a group member in the group.

    Sample response

    {
    "ActionStatus": "OK",
    "ErrorInfo": "",
    "ErrorCode":0
    }

    Response fields

    Field
    Type
    Description
    ActionStatus
    String
    Request result. OK: successful; FAIL: failed
    ErrorCode
    Integer
    Error code. 0: Successful; other values: Failed
    ErrorInfo
    String
    Error information

    Error Codes

    The returned HTTP status code for this API is always 200 unless a network error (such as error 502) occurs. The specific error code and details can be found in the response fields ErrorCode and ErrorInfo respectively. For public error codes (60000 to 79999), see Error Codes. The following table describes the error codes specific to this API:
    Error Code
    Description
    10002
    Internal server error. Try again.
    10003
    Invalid command word.
    10004
    Invalid parameter. Check the error description and troubleshoot the issue.
    10026
    The command word of the SDKAppID request is disabled. Please submit a ticket.
    10007
    Insufficient operation permissions. Check whether the operator is the app admin or whether the operator has the permission to modify the fields in the request.
    10010
    The group does not exist or has been deleted.
    10015
    Invalid group ID. Use the correct group ID.

    API Debugging Tool

    Use the RESTful API online debugging tool to debug this API.

    References

    문의하기

    고객의 업무에 전용 서비스를 제공해드립니다.

    기술 지원

    더 많은 도움이 필요하시면, 티켓을 통해 연락 바랍니다. 티켓 서비스는 연중무휴 24시간 제공됩니다.

    연중무휴 24시간 전화 지원