Why Is the Error Message "The username or password is wrong." Displayed?
Symptom
"The username or password is wrong." is displayed when you obtain the token.
Check whether your Huawei Cloud account has been upgraded to a Huawei ID. If you log in to your Huawei Cloud account through the Huawei ID entry, you will be prompted to upgrade your account.
If your Huawei Cloud account has been upgraded to a Huawei ID, you cannot obtain an account token. Create an IAM user and use it to obtain a token.
Step 1: Create an IAM User
- Log in to the Huawei Cloud management console, hover your cursor over the username in the upper right corner of the page, and choose Identity and Access Management from the drop-down list.
Figure 1 Selecting Identity and Access Management
- On the Users page, click Create User. On the displayed page, set the username and password to create an IAM user.
Figure 2 Create User
Figure 3 Setting the username and password
- Grant the admin permission to the IAM user.
Figure 4 Joining a user group
Step 2: Use the IAM User to Obtain a Token
The following uses obtaining a token in the AP-Bangkok (ap-southeast-2) region as an example.
You can log in to the console and choose My Credentials > API Credentials to obtain the values of username, domainname, and project name. password indicates the user password.
POST https://iam.ap-southeast-2.myhuaweicloud.com/v3/auth/tokens //Uses obtaining the token in the AP-Bangkok region as an example. Request Header: Content-Type: application/json Request Body: { "auth": { "identity": { "methods": [ "password" ], "password": { "user": { "name": "username", //IAM username "password": "********", //IAM user password "domain": { "name": "domainname" //Master account name } } } }, "scope": { "project": { "name": "project name" //Region name, for example, ap-southeast-2 } } } }
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