How Do I Obtain a Token?
Construct a token request as follows:
You can log in to the console and choose My Credentials to obtain the values of username, domainname, and project name. password indicates the user password.
If your Huawei Cloud account has been upgraded to a Huawei Cloud account, you cannot obtain a token. You are advised to create an IAM user and obtain the user token.
POST https://iam.ap-southeast-3.myhuaweicloud.com/v3/auth/tokens Content-Type: application/json { "auth": { "identity": { "methods": [ "password" ], "password": { "user": { "name": "username", "password": "********", "domain": { "name": "domainname" } } } }, "scope": { "project": { "name": "region" } } } }
As shown in the following figure, x-subject-token in the response header is the desired user token. This token can then be used to authenticate the calling of SIS APIs.
After obtaining the token, add the X-Auth-Token header field to requests to specify the token for calling other APIs. For example, if the token is ABCDEFJ...., add X-Auth-Token: ABCDEFJ.... to a request as follows:
Content-Type: application/json X-Auth-Token: ABCDEFJ....
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