API Key Authentication
Secure Your Fastify API with API Keys
The Zuplo API Gateway protects your backend API from unauthorized access, abuse, and overload. Add API key authentication to your Fastify API in minutes.
Secure Access
Authenticate every request before it reaches your backend.
Control Costs
Set rate limits and quotas to prevent runaway usage.
Ensure Reliability
Shield your backend from overload with traffic management.
How it works
The Zuplo API Gateway sits between your clients and your Fastify backend, providing a secure layer of protection and control.
Step-by-step tutorial
It takes only a few minutes to put Zuplo in front of your Fastify backend, adding API key authentication, and configuring your origin to trust requests from Zuplo using JWT verification.
Create a Route in Zuplo
First, create a new route in your Zuplo project that will proxy requests to your Fastify backend. This route will be the entry point for your API consumers.

📄 OpenAPI native. Import your existing OpenAPI spec to instantly create routes and power your API documentation.
Add API Key Authentication Policy
Add the API Key Authentication policy to your route. This policy validates incoming API keys and ensures only authorized consumers can access your API.

🔐 Leaked key? No problem. As a GitHub Secret Scanning partner, Zuplo can automatically revoke exposed keys before they can be exploited.
Enable the JWT Service Plugin
Enable the JWT Service Plugin in your Zuplo project. This plugin generates JWTs that your origin API can validate, creating a secure trust relationship between Zuplo and your backend.
Secure Your Fastify API with JWT Authentication
Configure your Fastify backend to validate the JWTs issued by Zuplo. This ensures that only requests coming through your Zuplo gateway are accepted.
Call Your API Through Zuplo
Now you can call your API through Zuplo using an API key. The request will be authenticated at the gateway, and a JWT will be forwarded to your Fastify backend.
Ready to secure your API?
Get started with Zuplo for free and add API key authentication to your Fastify API in minutes.