The Lnar API uses Bearer token authentication. Include your token in the Authorization header of every request.
Using API keys
You can create API keys through the API keys endpoints or the dashboard.
curl -H "Authorization: Bearer lnar_your_api_key" \
https://api.lnar.dev/v1/repositories
API keys grant full access to your account. Keep them secret and never expose them in client-side code.
Managing keys
| Action | Endpoint |
|---|
| List | GET /v1/auth/keys |
| Create | POST /v1/auth/keys |
| Revoke | DELETE /v1/auth/keys/{key_id} |
The plaintext key is only returned once at creation time. Store it securely.
OAuth 2.0
For third-party integrations, Lnar supports OAuth 2.0 with PKCE. See the OAuth 2.0 section in the sidebar for authorization, token, and client registration endpoints.