Help Center/ Live/ FAQs/ API Usage/ Why Does the System Display a Message Indicating that the API Does Not Exist When I Call an API?
Updated on 2022-03-31 GMT+08:00

Why Does the System Display a Message Indicating that the API Does Not Exist When I Call an API?

It is possible that the token obtained is for a global service because scope was set to domain. Live is a project-level service, which is deployed in specific physical regions. Set scope to project. An example request for obtaining a user token is as follows:

Note: Set username, domainname (name of the account to which the user belongs, which can be obtained from the My Credentials page), password, and projectname.

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

{
  "auth": {
    "identity": {
      "methods": [
        "password"
      ],
      "password": {
        "user": {
          "name": "username",   
          "password": "password", 
          "domain": {
            "name": "domainname"    
          }
        }
      }
    },
    "scope": {
      "project": {
         "name": "projectname"  
      }
    }
  }
}