对话机器人服务 CBS-提示账号或密码错误“The username or password is wrong.”:步骤2:使用IAM账户获取Token

时间:2024-05-11 08:28:20

步骤2:使用 IAM 账户 获取Token

以获取华北-北京四(cn-north-4)区域的Token为例。

POST https://iam.cn-north-4.myhuaweicloud.com/v3/auth/tokens
Request Header:
Content-Type: application/json

Request Body:
{ 
    "auth": { 
        "identity": { 
            "methods": [ 
                "password" 
            ], 
            "password": { 
                "user": { 
                    "name": "username", //子账户名称
                    "password": "********", //子账户密码
                    "domain": { 
                        "name": "domainname" //主账户名称
                    } 
                } 
            } 
        }, 
        "scope": { 
            "project": { 
                "name": "project name" //区 域名 称,如cn-north-4
            } 
        } 
    } 
}
support.huaweicloud.com/cbs_faq/cbs_02_0002.html