tencent cloud

피드백

Obtaining Permission Group Information

마지막 업데이트 시간:2024-07-16 11:20:06

    Feature Overview

    App admins can call this API to obtain relevant information about the permission group.

    API Calling Description

    Applicable Group Types

    Group Type
    Whether This RESTful API Is Supported
    Private
    Not supported, same as Work (Work Friend Group) in the new version
    Public
    Not supported
    ChatRoom
    Not supported, same as Meeting (Temporary Meeting Group) in the new version
    AVChatRoom
    Not supported
    Community
    Supported
    Chat provides the aforementioned four types of groups. For details, refer to Group System.

    Sample Request URL

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

    Request Parameters

    The table below only lists the parameters modified when calling this API and their descriptions. For details on the parameters, refer to RESTful API Overview.
    Parameter
    Description
    xxxxxx
    The dedicated domain name for 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/get_permission_group
    Request API
    sdkappid
    SDKAppID assigned by the Chat console when an app is created
    identifier
    You must be an app admin account. For details, refer to App Admins.
    usersig
    The signature generated by the app admin account. For details, 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 Packet

    Obtaining All Permission Groups
    {
    "GroupId": "@TGS#_@TGS#cV6IHIIM62C4",
    "Limit": 20,
    "Next": ""
    }
    Obtaining Specified Permission Group
    {
    "GroupId": "@TGS#_@TGS#cV6IHIIM62C4",
    "PermissionGroupIdList": [
    "@PMG#_test_permission_group_with_topic",
    "@PMG#_@PMG#cA7VPIIM62CJ"
    ]
    }

    Description of Request Packet Fields

    Field
    Type
    Attribute
    Description
    GroupId
    String
    Required
    ID of the group to operate on
    PermissionGroupIdList
    String
    Optional
    The list of permission groups to be obtained. If this field is empty, it means all permission groups are obtained.
    Limit
    Integer
    Optional
    How many permission groups' information can be obtained at one time. It cannot exceed 20 and is used for pagination to obtain all permission groups.
    Next
    Integer
    Optional
    The position of the last permission group obtained. Fill in "" for the first call, and fill in the Next Value returned in the response for subsequent pulling.

    Sample Response Packet

    Obtaining All Permission Groups
    {
    "ActionStatus": "OK",
    "ErrorInfo": "",
    "ErrorCode": 0,
    "PermissionGroupInfoList": [ // The permission group information returned. Each item represents one permission group.
    {
    "ErrorCode": 0, // The result of obtaining this permission group
    "ErrorInfo": "",
    "PermissionGroupId": "@PMG#_@PMG#cO4",
    "PermissionGroupName": "test_permission_group",
    "CustomString": "test_custom_string",
    "Permission": 123,
    "MemberCount": 0 // Number of members in the permission group
    },
    {
    "ErrorCode": 0,
    "ErrorInfo": "",
    "PermissionGroupId": "@PMG#_@PMG#cP5",
    "PermissionGroupName": "test_permission_group",
    "CustomString": "test_custom_string",
    "Permission": 123,
    "MemberCount": 0
    },
    {
    "ErrorCode": 0,
    "ErrorInfo": "",
    "PermissionGroupId": "@PMG#_@PMG#cQ6",
    "PermissionGroupName": "test_permission_group",
    "CustomString": "test_custom_string",
    "Permission": 123,
    "MemberCount": 0
    },
    // The following omits some permission group information.
    ],
    "Next": ""
    }
    Obtaining Specified Permission Group
    {
    "ActionStatus": "OK",
    "ErrorInfo": "",
    "ErrorCode": 0,
    "PermissionGroupInfoList": [
    {
    "ErrorCode": 0,
    "ErrorInfo": "",
    "PermissionGroupId": "@PMG#_test_permission_group_with_topic",
    "PermissionGroupName": "test_permission_group",
    "CustomString": "test_custom_string",
    "Permission": 123,
    "MemberCount": 1
    },
    {
    "ErrorCode": 0,
    "ErrorInfo": "",
    "PermissionGroupId": "@PMG#_@PMG#cP5",
    "PermissionGroupName": "test_permission_group",
    "CustomString": "test_custom_string",
    "Permission": 123,
    "MemberCount": 0
    }
    ],
    "Next": ""
    }

    Description of Response Packet Fields

    Field
    Type
    Description
    ActionStatus
    String
    Result of the request processing
    OK: Indicates successful processing.
    FAIL: Indicates failure.
    ErrorCode
    Integer
    Error code
    0: Indicates success.
    Non-zero: Indicates failure.
    ErrorInfo
    String
    Error message
    PermissionGroupInfoList
    Array
    The obtained permission group data list (note that each permission group data includes ErrorCode and ErrorInfo. Only the data with ErrorCode as 0 is meaningful). For field details, refer to Permission Group Information.

    Error Codes

    Unless a network error (such as a 502 error) occurs, the HTTP return code for this API is always 200. The real error code and error message are indicated by ErrorCode and ErrorInfo in the response packet body. 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
    10002
    Internal server error. Try again.
    10003
    Illegal request command word
    10004
    Invalid parameter. Check if the request is correct based on the error description.
    10007
    Insufficient operation permissions, such as lacking the permission to create a permission group
    10010
    The group does not exist, or it existed in the past but has now been dissolved.
    10015
    Invalid group ID. Check if the group ID is filled in correctly.
    10016
    The developer backend has denied this operation through third-party callback.
    11000
    The requested SDKAppID does not support communities or communities with topics. Apply for a qualified SDKAppID, configure it, and then make a request again.
    110006
    The permission group does not exist, or it existed in the past but has now been dissolved.
    110008
    Invalid permission group ID. Check if the permission group ID is filled in correctly.

    API Debugging Tool

    Use the RESTful API Online Debugging Tool to debug this API.

    References

    Creating Permission Groups (Creating Permission Groups)
    Terminating Permission Groups (Terminating Permission Groups)
    Modifying Permission Group Information (Modifying Permission Group Information)
    
    
    
    문의하기

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

    기술 지원

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

    연중무휴 24시간 전화 지원