You use API tokens to authenticate yourself when you interact with our APIs. Previously called an OAuth Refresh token, an API token handles authorization more securely than an access key because it authorizes access per organization, and not across all your organizations.
How does it work? You generate an API token. Then, you replace the API token for a CSP token which lets you interact with the APIs of the VMware Cloud Services Platform (CSP) and of your VMware Cloud services. You can generate more than one API token. A token is valid for six months, after which time you regenerate it. If you feel the token has been compromised, you can revoke the token to prevent unauthorized access. You generate a new token to renew authorization.
Here are some links to the CSP RESTful APIs:
New Account Management (AM) microservice: https://console.cloud.vmware.com/csp/gateway/am/api/swagger-ui.html#/
Service Lifecycle: https://console.cloud.vmware.com/csp/gateway/slc/api/swagger-ui.html#/
- On the VMware Cloud Services toolbar, click your user name and select .
- Click New Token.
- Click Copy to Clipboard.
- Perform a POST to /am/api/auth/api-tokens/authorize.
csp-authtoken is generated.
- Paste the CSP token into your script.