Search the VMware Knowledge Base (KB)
View by Article ID

Logging in to the VMware vCloud Director API using VMware vCloud Air credentials (2054827)

  • 7 Ratings


This article provides steps to log in to the VMware vCloud Director API using VMware vCloud Air credentials.


Note: Using a REST client is necessary to obtain or verify some of the configuration information.
To obtain the vCloud Director URL:
  1. Log in to the VMware vCloud Air portal.
  2. Click a virtual datacenter to open it.
  3. Under Related Links, click vCloud Director URL.

    Note: The URL looks similar to For the purposes of this article, the "vcloud-url" is everything before the 443, but note the org name (21-170 in this example) as it is used in the example later.
To query the vCloud Director API versions:
  1. Open a REST client of choice.
  2. Issue a GET request to https://vcloud-url/api/versions.
  3. Locate the LoginUrl item(s) to verify the URL to use with the version of the API you want to work with. For example:


  4. Note the LoginURL.
To issue the API login request:
  1. Using a REST client, prepare a POST request to the login URL noted above.
  2. Create an "Authorization" header item using "Basic Authentication" within the REST client
    • The username is in this format: (21-170 in this example)
    • The password is the same password used to log into the VMware vCloud Air portal

  3. Create an "Accept" header item with the content "application/*+xml;version=5.1"

    Note: The version can be any applicable API version as returned by the version check above.

  4. Issue the POST request and verify the return information.
  5. Assuming a response 200, take note of the "x-vcloud-authorization" header value. This is the token to be used with further API calls.

If the login request was successful, this process can be duplicated programmatically in the language you are using to develop the software making these vCloud Director API calls. When the vCloud Director API login URL is known, it should not change. The only steps you need to repeat at the login steps. The sections prior to the login are strictly for gathering information related to the API setup on vCloud Air.

Additional Information

For more information, see the VMware vCloud Director 5.1 API Programming Guide.

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.


  • 7 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)

Please enter the Captcha code before clicking Submit.
  • 7 Ratings