Assigns one or more roles to a RAM user.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only common request headers. For more information, see the topic about common request parameters.

Request syntax

POST|DELETE|PUT /pop/v5/account/authorize_role HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
RoleIds String Query Yes 1;2

The ID of the role to be assigned. If you want to assign multiple roles to the specified RAM user, separate the IDs of the roles with semicolons (;). If you leave this parameter empty, the roles assigned to the specified RAM user are revoked.

TargetUserId String Query Yes test@133******

The ID of the RAM user to which you want to assign the roles.

Response parameters

Parameter Type Example Description
Code Integer 200

The HTTP status code.

Message String success

The returned message that indicates whether the call is successful.

RequestId String 57609587-DFA2-*******


Sample requests

POST /pop/v5/account/authorize_role HTTP/1.1
Common request headers
  "TargetUserId": ""

Sample success responses

XML format


JSON format

	"RequestId": "57609587-DFA2-41EC-****-*********",
	"Code": "200",
	"Message": "sucess"

Error codes

For a list of error codes, visit the API Error Center.