You use an HTTP bearer token to authenticate a vRealize Automation REST API consumer request .

Avant de commencer

  • Log in to vRealize Automation using the applicable credentials. For example, to assign a user to a role, log in as a tenant administrator.

  • Verify that the host name and fully qualified domain name of the vRealize Automation instance are available.

Pourquoi et quand exécuter cette tâche

A consumer request must specify the correct component registry service and resource. For example, the URL to obtain an HTTP bearer token must specify the identity service and token resource.

The HTTP bearer token expires in 24 hours by default. See Configure the Duration of an HTTP Bearer Token for information on how to set the duration.

For related information, see Syntax for Requesting an HTTP Bearer Token.


Enter a curl command in the following format, replacing the variables with the correct values.

The variable $vRA used in this example represents the host name.domain name of the vRealize Automation server, for example,

curl --insecure -H "Accept: application/json" -H 'Content-Type: application/json'
--data '{"username":"usrname","password":"passwd","tenant":"tenantURLtoken"}' 

For example, enter the following command line:

curl --insecure -H "Accept: application/json" -H 'Content-Type: application/json' --data


The command returns a response header with a status code and, if your request is successful, an HTTP bearer token.

For example, the following sample output displays based on the command input:

HTTP/1.1 200 OK
  Server: Apache-Coyote/1.1
  Cache-Control: no-cache, no-store
  Pragma: no-cache
  Expires: Thur, 16 Jul 2015 23:59:59 GMT
  Content-Type: application/json;charset=UTF-8
  Content-Length: 324
  Date: Wed, 15 Jul 2015 13:04:50 GMT

Que faire ensuite

Include the HTTP bearer token in your REST API service calls. You can store the token in a variable such as $AUTH and then use the variable in your requests.