Authenticating when invoking a private function via HTTPS
Written by
Updated at October 30, 2026
To invoke a private function via HTTPS, you need to get authenticated. These are the types of credentials you can use:
-
- Guide for a Yandex account.
- Guide for a service account.
- Guide for a federated account.
- Guide for a local account.
Provide the IAM token in the
Authorizationheader in the following format:Authorization: Bearer <IAM_token>IAM tokens are valid for up to 12 hours.
-
Service account API key.
For authentication with an API key, specify
yc.serverless.functions.invokeas the key scope. Provide the API key in theAuthorizationheader in the following format:Authorization: Api-Key <API_key>Use API keys if requesting an IAM token automatically is not an option.
Scope is an API key parameter that restricts the key's use to specific operations in addition to the service account's access permissions. For details, see API keys with scope and validity limits.