To call APIs using a token, add the token to the X-Auth-Token header in API requests.
You can use either of the following authentication methods to call APIs:
curl -X POST https://{iam_endpoint}{iam_endpoint}/v3/auth/tokens -H 'content-type: application/json' -d '{"auth": {"identity": {"methods": ["password"],"password": {"user": {"name": "{{user_name}user_name}","domain": {"name": "{{user_name}user_name}"},"password": "{{password}password}"}}},"scope": {"project": {"id": "{project_id}{project_id}"}}}}' -vk
Modify the parameters in the preceding command according to the following description. For details, see the API forObtaining a User Token in the Identity and Access Management API Reference.
The token value is the X-Subject-Token value in the response header as shown below:
Figure 1 Obtaining the X-Subject-Token response header

export Token={X-Subject-Token}
X-Subject-Token is the token obtained in 1.a. Example:
export Token=MIIDkg******BZQMEAgEwgMIIDkg******BZQMEAgEwg
curl -X Request_method Domain name+URL -H "x-auth-token: $Token$Token" -vk