KBAISE/ for lovable
Library
Docs

Get current token

about 5 minShippingchecked 36h agoOfficial page
The short version

This endpoint lets you check who owns your API key and what permissions it has. It confirms your key is active and valid without exposing the secret key itself.

Anyone on a Business plan or higher integrating with the Lovable API who needs to verify their API key permissions and owner details.

Do this, in order

  1. 1

    Create an API key in your Lovable account settings under Settings > API Keys.

    You need an active key tied to your workspace to authenticate requests to the Lovable API.

  2. 2

    Save your API key as a secure environment variable named LOVABLE_API_KEY in your project.

    Storing keys in environment variables prevents leaking credentials in your code.

  3. 3

    Send a GET request to https://api.lovable.dev/v1/token with the header Lovable-API-Key set to your key and Lovable-Version set to 2026-09-11.

    This endpoint inspects the credentials sent in your request header and returns its metadata.

  4. 4

    Check the returned scopes and owner information in your app to ensure the key has the necessary read or write permissions.

    Verifying scopes in advance prevents permission errors when calling other project or workspace endpoints.

Paste this into your project

Create a backend function and an admin status card that checks our Lovable API key status. It should send a GET request to https://api.lovable.dev/v1/token using the LOVABLE_API_KEY secret in the Lovable-API-Key header, along with the Lovable-Version header set to 2026-09-11. Display the key owner's name, email, and the list of active scopes in the UI, and show a clear error message if the key is invalid or lacks access.

Words decoded

API key
A secret password your application uses to identify itself when talking to Lovable's servers.
Scope
A specific permission granted to an API key, determining whether it can read or modify projects and workspaces.
Endpoint
A specific web address on an API server that performs a particular task or returns specific information.

Where people get stuck

  • Calling this endpoint requires a Business plan or higher; other plans will receive a payment required error.
  • You cannot pass another token in the URL or request body to inspect it; the endpoint only inspects the key used in the request header.
  • The API will not return your actual secret key in the response, only its owner, type, and scopes.
  • Each API key belongs to a single workspace; it cannot access data or inspect resources belonging to another workspace.

The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.