The API key authentication component validates incoming requests by extracting an API key from the HTTP request and checking it against a list of trusted credentials. Configure the component to read the key from a URL parameter, request header, or cookie.
Feature category: Authentication and authorization
Field descriptions
ComponentConfig
| Parameter | Type | Required | Default | Description |
|---|
| Config | ApiKeyConfig | Yes | - | The API key authentication configuration. |
ApiKeyConfig
| Parameter | Type | Required | Default | Description |
|---|
| ApiKeySources | ApiKeySourcesConfig | Yes | - | Where to extract the API key from. Only one extraction source is supported. |
| ApiKeyCredentials | ApiKeyCredential[] | Yes | - | The list of trusted API key credentials to validate against. |
ApiKeySourcesConfig
Specify exactly one of the following fields. The component reads the API key from the configured source.
| Parameter | Type | Required | Default | Description |
|---|
| Headers | String[] | No | - | The request headers to extract the API key from. |
| Params | String[] | No | - | The URL parameters to extract the API key from. |
| Cookies | String[] | No | - | The cookies to extract the API key from. |
ApiKeyCredential
| Parameter | Type | Required | Default | Description |
|---|
| Provider | ApiKeyCredentialProvider | Yes | System | The credential type. Valid values: System, Custom. |
| Credential | String | Conditional | - | The API key string. Required when Provider is Custom. Length: 8–512 characters. |
ApiKeyCredentialProvider
| Value | Description |
|---|
| System | A system-generated credential. |
| Custom | A user-uploaded credential. |
Error codes
| HTTP status code | Error message | Cause |
|---|
| 401 | Client authentication failed. | API key verification failed. The API key is invalid or missing. |