tencent cloud

Business Intelligence

Product Introduction
Product Overview
Strengths
Product Features
Use Cases
Purchase Guide
Billing Instructions
Purchase Guide
Upgrade Instructions
Renewal Instructions
Quick Start
Data Access
Creating a VPC Data Source
Creating Cloud Data Sources
Creating Proprietary Data Sources
Data Table Creation and Data Processing
Introduction to Data Analysis Basics
Data Table Creation
Data Processing
Data Analysis
Analysis Settings
Interactive Analysis
Ad-Hoc Analysis
Data Visualization
Public Style Setting Instructions
Filter Components
Chart components
Rich Text Component
Other Components
Mobile Terminal Layout Editor
Theme Settings Introduction
Page Layout Introduction
Dashboard Directory Management
Collaboration and Application
Push Channel Management
Report Push
Sharing
Embedding
Self-Service Data Retrieval
Metric Alarms
Data Security
Parameter Construction
Platform Management
Account and Permission Management
Statistics and Analysis
System Settings
Resource Migration
Practical Tutorial
Collection of Optimization Practices
Performing Trend Analysis
Performing Proportion Analysis
Performing Data Analysis with Excel Files
Creating Tables
API Documentation
History
Introduction
API Category
Making API Requests
Project Management APIs
Role APIs
Database Table APIs
Report Embedding APIs
Page Management APIs
Data Types
Error Codes
FAQs
Relevant Agreements
Service Level Agreement
Privacy Policy
Data Privacy And Security Agreement
Contact Us

CreateUserRole

PDF
Focus Mode
Font Size
Last updated: 2026-03-19 19:09:21

1. API Description

Domain name for API request: bi.intl.tencentcloudapi.com.

This API is used to create a user role.

A maximum of 100 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: CreateUserRole.
Version Yes String Common Params. The value used for this API: 2022-01-05.
Region No String Common Params. This parameter is not required.
RoleIdList.N No Array of Integer Role ID list.
UserInfoList.N No Array of UserInfo User list (new).
UserGroups.N No Array of Integer User group ID list.

3. Output Parameters

Parameter Name Type Description
ErrorInfo ErrorInfo Custom error information object.
Note: This field may return null, indicating that no valid values can be obtained.
Extra String Expansion.
Note: This field may return null, indicating that no valid values can be obtained.
Data DataId Data.
Note: This field may return null, indicating that no valid values can be obtained.
Msg String Message.
Note: This field may return null, indicating that no valid values can be obtained.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 demo

This example shows you how to create a user.

Input Example

POST / HTTP/1.1
Host: bi.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateUserRole
<Common request parameters>

{
    "RoleIdList": [
        1982493789748932
    ],
    "UserInfoList": [
        {
            "UserId": "User ID",
            "UserName": "Username",
            "Email": "Mailbox",
            "PhoneNumber": "Mobile number",
            "AreaCode": "Telephone country code",
            "AppUserId": "WeCom account ID",
            "AppUserName": "WeCom account name"
        }
    ],
    "UserList": [
        {
            "UserId": "User ID",
            "UserName": "Username",
            "CorpId": "Enterprise ID",
            "Email": "Mailbox",
            "Status": 1982493789748932,
            "FirstModify": 1982493789748932,
            "PhoneNumber": "Mobile number",
            "AreaCode": "Telephone country code",
            "CreatedUser": "Creator",
            "UpdatedUser": "Modifier",
            "GlobalUserName": "Global role",
            "Mobile": "Mobile number",
            "AppId": "1",
            "AppUserId": "1",
            "AppUserAliasName": "1",
            "AppUserName": "1",
            "InValidateAppRange": false
        }
    ]
}

Output Example

{
    "Response": {
        "Msg": "success",
        "RequestId": "30672eed-81e6-4d8f-a630-3d472531490b",
        "Extra": "",
        "Data": {
            "Id": 1
        }
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InternalError.Internal Internal error.
MissingParameter.MissingParam The required parameter is missing.
UnauthorizedOperation.Authorize Permission error.
UnauthorizedOperation.UserNotExist The user does not exist.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback