Obtaining the Identity Information of a Caller
Function
This API is used to obtain the identity information of a caller (such as a user or agency).
Authorization Information
No identity policy-based permission required for calling this API.
URI
GET /v5/caller-identity
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Security-Token |
No |
String |
When an API is called using a temporary security credential, the HTTP request header X-Security-Token must be provided. The value is the security_token field of the temporary security credential. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
account_id |
String |
Account ID. Maximum: 64 |
|
principal_urn |
String |
Principal URN. Minimum: 4 Maximum: 1024 |
|
principal_id |
String |
Principal ID. Minimum: 2 Maximum: 256 |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Example Requests
Obtaining the identity information of a caller
GET https://{endpoint}/v5/caller-identity
Example Responses
Status code: 200
Successful
{
"account_id" : "27680d67da6b47eb82d00a1a118be145",
"principal_urn" : "iam::27680d67da6b47eb82d00a1a118be145:user:user-name",
"principal_id" : "user-id"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Successful |
|
500 |
Server error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot