If API requests are authenticated using tokens, the request header must contain X-Auth-Token (token information).
This section describes how to call an API for token authentication.
A cloud service can be deployed globally or at the project level.
Replace the texts in italic with actual ones. For details, see Identity and Access Management API Reference.
Log in to the management console, click your username in the upper right corner, and choose My Credential from the drop-down list. On the My Credentials page, obtain your username, domain name, and project ID.
{ "auth": { "identity": { "methods": [ "password" ], "password": { "user": { "name": "username", // IAM username "password": "password", // IAM user password "domain": { "name": "domainname" // Name of the domain to which the IAM user belongs } } } }, "scope": { "project": { "id": "0215ef11e49d4743be23dd97a1561e91" // Project ID } } } }
The following shows an example of a global service request:
{ "auth": { "identity": { "methods": [ "password" ], "password": { "user": { "name": "username", // IAM username "password": "password", // IAM user password "domain": { "name": "domainname" // Name of the domain to which the IAM user belongs } } } }, "scope": { "domain": { "name": "domainname" // Name of the domain to which the IAM user belongs } } } }
The following figures illustrate how to use Postman to manually obtain a token.