All Products
Search
Document Center

Server Load Balancer:API key authentication component

Last Updated:Feb 27, 2026

The API key authentication component authenticates and authorizes requests based on API keys. It extracts API keys from HTTP request URL parameters, headers, or cookies, and verifies them against a preconfigured list of trusted credentials.

Feature category

Authentication and authorization

Field descriptions

ComponentConfig

Parameter

Type

Required

Default

Description

Config

ApiKeyConfig

Yes

-

API key authentication configuration.

ApiKeyConfig

Parameter

Type

Required

Default

Description

ApiKeySources

ApiKeySourcesConfig

Yes

-

How to extract the API key from the request. Only a single extraction source is supported.

ApiKeyCredentials

ApiKeyCredential[]

Yes

-

List of trusted API key credentials.

ApiKeySourcesConfig

Parameter

Type

Required

Default

Description

Headers

String[]

No

-

Extract the API key from HTTP request headers.

Params

String[]

No

-

Extract the API key from URL parameters.

Cookies

String[]

No

-

Extract the API key from cookies.

ApiKeyCredential

Parameter

Type

Required

Default

Description

Provider

ApiKeyCredentialProvider

Yes

System

Credential type.

Credential

String

Conditional

-

The API key string. Required when Provider is Custom. Length: 8–512 characters.

ApiKeyCredentialProvider

Value

Description

System

System-generated credential.

Custom

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.