VK Cloud logo
Updated atMarch 20, 2024   06:18 AM

Getting a Keystone access token

A Keystone token is required to work with some components and resources of the VK Cloud platform via their API. The examples of such are the Virtual networks (Neutron) service and the backups component of the Cloud Servers service.

Preparatory steps

  1. Go to your VK Cloud personal account.
  2. Make sure that two-factor authentication and API access are enabled.
  3. At the top of your personal account page, select the project for which you need a token.

Token generation

Get a token:

  1. On the Project settings page of the personal account, open the API access tab.

    A new token is generated automatically when you open the page. If the page remains open, the token is automatically regenerated once in an hour.

  2. In the lower part of the page, click on the Copy icon next to the API access token parameter. The token will be copied to clipboard.

    The token lifetime is shown when you hover your mouse over the Copy icon. If the token expires soon, use the Reissue button.

Usage example for the token

Task: to get a list of networks via the REST API (Neutron service).

  1. In your personal account, find the endpoint for the Neutron service. In this example: https://infra.mail.ru:9696.

  2. Get the token and copy its value.

  3. Execute the command using the cURL utility:

    curl https://infra.mail.ru:9696/v2.0/networks -H "Accept: application/json" -H "X-Auth-Token: <token generated in the previous step>"

Other examples of token usage: