Skip to main content
Use apiKey(...) when you want a simple shared-secret header on HTTP requests.

Basic example

Clients send:

Multiple valid keys

Custom validation

Advanced

Use contextKey only if you want the validated key stored somewhere other than ctx.apiKey.

See also