Authentication with the Workflows API
To work via the API, you can use an IAM token or an API key.
Note
You can use an API key only for methods of the Execution resource.
IAM token
An IAM token is a unique sequence of characters issued to the user following authentication.
How to get an IAM token:
- Guide for Yandex accounts.
- Guide for a service account.
- Guide for a federated account.
- Guide for a local account.
Specify the received IAM token when accessing Yandex Cloud resources via the API. Provide the IAM token in the Authorization header in the following format:
Authorization: Bearer <IAM_token>
If you have saved your IAM token to a variable, use the latter:
Authorization: Bearer ${IAM_TOKEN}
API key
The API key is a secret key only used for simplified authorization of service accounts with the Yandex Cloud API.
Guide to obtaining an API key for service accounts.
Use the API key you obtained when accessing Yandex Cloud resources via the API. Include the API key in the Authorization header, formatted as follows:
Authorization: Api-Key <API_key>
If you have saved the API key to a variable, use the latter:
Authorization: Api-Key ${API_KEY}