- what's new
- Service Overview
- Getting Started
- SDK Reference
- API Reference
-
FAQs
- General Consulting
- Billing
-
API
- Why Is the Recognition Result Very Poor?
- How Do I Call the APIs of SIS?
- Why Does the Returned Status is Normal But the Recognition Result is Empty?
- What Are the Username, Domain Name, and Project Name in the Token Message Body?
- Can I Call SIS APIs Concurrently?
- What Do I Do If the Error Message "auth failed" Is Displayed During SIS API Calling?
- What Do I Do If SIS API Calling Times Out?
- What Do I Do If the Error Message "The silence time is too long, and the audio will not be recognized" Is Displayed?
- How Do I Obtain a Token?
- SDK
- Error Code
- Deployment
- Regions and AZs
- Permissions
- General Reference
Show all
Copied.
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