Back to Templates

Unkey and Clerk

A simple template that shows how to use Unkey with an authentication provider

Written by
perkinsjr
Framework
Next.js
Language
Typescript
A simple template that shows how to use Unkey with an authentication provider

Unkey with Clerk

Getting Started

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.

1NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_xxxxxxxxxxxxxx
2CLERK_SECRET_KEY=sk_test_xxxxxxxxxxxxxx
3UNKEY_API_ID=api_xxxxxxxxxxxxxx
4UNKEY_ROOT_KEY=unkey_xxxxxxxxxxxxxx

Then you can run the server locally

1npm run dev

Open http://localhost:3000 with your browser to see the result.

Learn More

Protect your API.
Start today.

2500 verifications and 100K successful rate‑limited requests per month. No CC required.