Last updated: 2019-12-14 11:27:15


1. API Description

API domain name:

This SPI lists the user groups associated with a user.

Default API request rate limit: 20 requests/sec.

2. Input Parameters

The following parameters are required for requesting this API, including action-specific parameters and common parameters. For more information about common parameters for all requests, see Common Request Parameters.

Parameter name Required Type Description
Action Yes String Common parameter; the name of this API: ListGroupsForUser
Version Yes String Common parameter; the version of this API: 2019-01-16
Region No String Common parameter; optional for this API.
Uid Yes Integer Sub-user UID
Rp No Integer Quantity per page.
Page No Integer Page number.

3. Output Parameters

Parameter name Type Description
TotalNum Integer Total number of user groups to which the sub-user is added
GroupInfo Array of GroupInfo User group information
RequestId String The ID of the request. Each request returns a unique ID. The RequestId is required to troubleshoot issues.

4. Sample

Sample 1. Listing the User Groups Associated with a User

Input Sample Code
&<Common request parameter>

Output Sample Code

  "Response": {
    "TotalNum": 1,
    "GroupInfo": [
        "GroupId": 2020,
        "GroupName": "test1",
        "CreateTime": "2019-04-03 15:11:34",
        "Remark": "test2"
    "RequestId": "a614c392-3079-4dab-b819-0ab0563a32f0"

5. Developer Resources

API Explorer

This tool provides various capabilities such as online call, signature verification, SDK code generation, and quick API retrieval that significantly reduce the difficulty of using TencentCloud API.

6. Error Codes

The following error codes are API business logic-related. For other error codes, see Common Error Codes.

Error Code Description
ResourceNotFound.UserNotExist The user does not exist.