Updated on 2025-03-31 GMT+08:00

Obtaining the Domain-Level Token

The following example shows how to obtain the domain-level token.

POST https://{{endpoint}}/v3/auth/tokens
Content-Type: application/json

{
    "auth": {
        "identity": {
            "methods": [
                "password"
            ],
            "password": {
                "user": {
                    "name": "username",
                    "password": "********",
                    "domain": {
                        "name": "domainname"
                    }
                }
            }
        },
        "scope": {
            "domain": {
                "id": "xxxxxxxxxxxxxxxxxx"
            }
        }
    }
}
  • The validity period of a token is 24 hours. Cache the token to prevent frequent API calling.
  • To avoid token expiration during an API call, ensure that the time taken to complete a call is shorter than the time left before a token expires.