Authentication with the Yandex SpeechSense API
Written by
Updated at September 24, 2024
To use the SpeechSense API, create a service account and use it for authentication.
Service account
-
With an IAM token:
Note
The IAM token has a short lifetime: no more than 12 hours. This makes it a good method for applications that automatically request an IAM token.
-
Get an IAM token.
-
Provide the IAM token in the
Authorization
header in the following format:Authorization: Bearer <IAM_token>
-
-
With API keys.
Note
API keys do not expire. This means that this authentication method is simpler, but less secure. Use it if you can't automatically request an IAM token.
-
Provide the API key in the
Authorization
header in the following format:Authorization: Api-Key <API_key>
Do not specify the folder ID in your requests, as the service uses the folder the service account was created in.