- Documentation
Message Queue for Kafka
API Reference
V2(2022-05-01)
SASL user management
CreateUser - Create SASL user
SASL user management
CreateUser - Create SASL user
CreateUser - Create SASL user
Call the CreateUser API to create a Kafka SASL user.
Instructions
The CreateUser API creates a SASL user under the Kafka instance. This user can publish and subscribe to messages using the SASL/SCRAM or SASL/PLAIN mechanism.
Debug
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
Request parameters
Only the unique request parameters of this interface and some common parameters are listed below. For more information, see common parameters. Action string required Example value: CreateUser
Action to perform, value: CreateUser.
Version string required Example value: 2022-05-01
API version, value: 2022-05-01.
InstanceId string required Example value: kafka-cnngbnntswg1****
The instance ID to which the user belongs.
UserName string required Example value: test1
SASL user name. Must meet the following requirements:
- Consist of letters, numbers, hyphens (-), or underscores.
- Length should be 3 to 64 characters.
- Username cannot be set as admin or monitor and must be unique within the instance.
UserPassword string required Example: Test@123456
Password for SASL user. Must meet the following requirements:
- Length between 8 and 32 characters.
- Must include at least three of the following: uppercase letters, lowercase letters, numbers, special characters.
- Supported special characters include !@#$%^&*()_+-=.
Description string No Example value: describe
SASL user description information.
AllAuthority boolean required Example: true
Whether the user has read and write permissions for all topics by default.
- true: This user has read and write permissions for all topics.
- false: This user does not have read and write permissions for all topics.
PasswordType string No Example value: Plain
User password type, referring to the SASL user's type, supports the following settings:
- Scram: SASL user of SCRAM type.
- Plain: SASL user of PLAIN type.
tip
When creating a PLAIN type user, the effect is delayed by 1 minute. Please wait a moment. Thanks for your patience.
Response parameters
This interface has no unique response parameters. For more information, see the response structure. Request example
POST /?Action=CreatCreateUserePublicAddress&Version=2022-05-01 HTTP/1.1
Content-Type: application/json
Host: kafka.volcengineapi.com
X-Date: 20210328T100802Z
Authorization: HMAC-SHA256 Credential=AK********/20210328/cn-beijing/Kafka/request, SignedHeaders=x-date, Signature=********
"InstanceId": "kafka-cnngbnntswg1****",
"UserName": "user1123123123",
"UserPassword": "Test@123456",
Response example
"RequestId": "20230227211906E9F948120F87D27F1AEE",
"Version": "2022-05-01",
Error code
The following table lists error codes related to this interface and business logic. Refer to the Public error codes section for common error codes.
Last updated: 2025.06.30 12:00:30