Authentication with the Yandex SpeechSense API
Written by
Updated at February 6, 2024
To use the SpeechSense API, create a service account and use it for authentication.
Service account
-
Using an IAM token:
Note
The IAM token has a short lifetime — no more than 12 hours. That's why this is a good method for applications that automatically request an IAM token.
-
Specify the obtained 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.
-
Specify the obtained 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 YandexGPT uses the folder in which the service account was created.