Getting Authorization Tokens
In this article
Veeam Availability Console RESTful API authorization with Swagger UI involves the following procedures:
- Obtain a pair of tokens:
- On the Veeam.Portal.WebAPI page, expand the Accounts resource and click POST /token.
- In the grant_type drop-down list, make sure that password (default) is selected.
- In the username and password fields, specify the credentials of a user with the Veeam Availability Console Portal Administrator privileges.
- Click Try it out.
Wait for the response from the server. A successfully completed operation returns the 200 Success response code and an access and a refresh token in the response body.
- Save the refresh token locally for further use.
- Make sure that the access key is automatically inserted in the api_key field at the top of the page.
- To validate the access token, click Explore.
- When the access token expires, use the refresh token:
- On the Veeam.Portal.WebAPI page, expand the Accounts resource and click POST /token.
- From the grant_type drop-down list, select refresh_token.
- In the refresh_token field, insert the refresh token saved locally.
- Click Try it out.
Wait for the response from the server. A successfully completed operation returns the 200 Success response code and a new pair of tokens in the response body.
- When you finish working with Veeam Availability Console RESTful API:
- On the Veeam.Portal.WebAPI page, expand the Accounts resource and click POST /accounts/logout.
- Click Try it out.
Wait for the response from the server. A successfully completed operation returns the 200 Success response code and the “You have been logged out.” message in the response body.
Related Topics