Getting Authorization Tokens
The Veeam Service Provider Console REST API authorization with Swagger UI involves the following procedures:
- Obtain an access token:
- On the VSPC REST page, expand the Authentication resource and click POST /token.
- Click the Try it out button.
- In the username and password fields, specify the credentials of a user with the privileges of a user that has access to the Veeam Service Provider Console REST API.
- Click Execute.
Wait for the response from the server. A successfully completed operation returns the 200 OK response code and an access token in the response body.
- Copy the access token.
- Click the Authorize button. The Available authorizations window will open.
- In the Value field, type Bearer and the space character, then paste the access token.
- Click Authorize.
- When the access token expires, use the refresh token:
- On the VSPC REST 3.0 page, expand the Authentication resource and click POST /token.
- Click Try it out.
- In the grant_type drop-down list, select refresh_token.
- In the refresh_token field, insert the refresh token saved locally.
- Click Execute.
Wait for the response from the server. A successfully completed operation returns the 200 OK response code and a new pair of tokens in the response body.
- When you finish working with the Veeam Service Provider Console REST API:
- Click the Authorize button. The Available authorizations window will open.
- Click the Logout button.