This example demonstrates how to use Unkey v2 API with Clerk authentication.
First, make sure you have a Clerk and Unkey account, and add them to the .env you can see an example in the .env.example.
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_xxxxxxxxxxxxxx
CLERK_SECRET_KEY=sk_test_xxxxxxxxxxxxxx
UNKEY_API_ID=api_xxxxxxxxxxxxxx
UNKEY_ROOT_KEY=unkey_xxxxxxxxxxxxxxThen you can run the server locally
pnpm run devOpen http://localhost:3000 with your browser to see the result.
- Blog Post - learn about how this project works
- Getting Started - A quickstart guide to Unkey
- Unkey v2 API Documentation - Documentation for the v2 API