KBAISE/ for lovable
Library
Docs

Create a custom connector

about 15 minBuildingchecked 3d agoOfficial page
The short version

You can connect any web service (API) to Lovable, whether it's public or private, by creating a custom connector. This lets everyone in your workspace use that service in their projects, just like any other built-in connection.

Workspace admins or owners need this when they want to connect a specific web service that isn't already available in Lovable.

Do this, in order

  1. 1

    Go to the 'Connectors' section in your Lovable dashboard, click the '+' button, and select 'Custom connector'.

    This opens the form where you'll define your new connector.

  2. 2

    Fill in the 'Details' section with a display name, short description, longer description, and optionally upload a logo and choose a category.

    This information helps people in your workspace understand what the connector does and find it easily.

  3. 3

    In the 'Authentication' section, choose how your web service expects credentials (like a bearer token, API key, or OAuth 2.0).

    This tells Lovable how to securely send login information when it talks to your web service.

  4. 4

    Still in 'Authentication', provide the 'API base URL' (the main address of your web service) and set up a 'Test request' (a simple request Lovable can make to check if the connection works).

    The base URL tells Lovable where to send requests, and the test request confirms that the connection is set up correctly when someone tries to use it.

  5. 5

    Optionally, in the 'Agent knowledge' section, add one or more knowledge files with a name, description, and content.

    These files teach Lovable how to use your web service effectively, explaining its key functions and how to format requests.

  6. 6

    Click 'Create' to finish setting up your custom connector.

    This makes your new connector available in your workspace's catalog for others to use.

Paste this into your project

I need to connect a new web service to Lovable. Here are the details:

**Display Name:** [Name of your API, e.g., 'Acme Projects API']
**Short Description:** [One-line summary, e.g., 'Project management boards']
**Description:** [Longer explanation of what it does]
**Category:** [Choose one: Productivity, Sales, Marketing, E-commerce, Support, Messaging, Development, Payments, or Other]
**Documentation URL (optional):** [Link to API docs]

**Authentication Method:** [Choose one: Bearer token, API key in a custom header, API key in a query parameter, Basic auth, Advanced, or OAuth 2.0]

**If API Key in Custom Header:**
  **Credential Label:** [e.g., 'API Key']
  **Header Name:** [e.g., 'X-Api-Key']
  **Value Prefix (optional):** [e.g., 'Bearer ']

**If API Key in Query Parameter:**
  **Credential Label:** [e.g., 'API Key']
  **Parameter Name:** [e.g., 'key']

**If OAuth 2.0:**
  **Authorization URL:** [Your provider's OAuth authorization endpoint]
  **Token URL:** [Your provider's OAuth token endpoint]
  **Scopes (optional, one per line or comma/space separated):** [e.g., 'read:projects', 'write:tasks']
  **Scope Separator (optional):** [Leave blank for space, or specify if comma needed]
  **Use PKCE (true/false):** [true if your provider supports/requires it]

**API Base URL:** [e.g., 'https://api.acmeprojects.com']
**Test Request Method:** [e.g., 'GET']
**Test Request Path:** [e.g., '/v1/me']

**Knowledge Files (optional, provide for each file):**
  **Name:** [e.g., 'Acme Projects API basics']
  **Description:** [e.g., 'Endpoints and request formats for reading and writing Acme Projects boards and tasks.']
  **Content:** [Markdown content for the knowledge file, including key endpoints, request examples, response formats, and notes. Do NOT include credentials or marketing copy.]

Please create this custom connector for my workspace.

Words decoded

API
Application Programming Interface. It's a set of rules that allows different software programs to talk to each other. Think of it like a menu in a restaurant that tells you what dishes you can order and how to order them.
REST API
A common type of API that uses standard web methods (like GET to get information, POST to send information) to communicate over the internet.
Endpoint
A specific web address within an API that performs a particular function. For example, '/users' might be an endpoint to get a list of users, and '/users/123' might be an endpoint to get details for user ID 123.
Authentication
The process of verifying who you are. When connecting to a web service, it's how you prove you have permission to use it, often with a secret key or password.
Bearer token
A type of security token used for authentication. It's like a special ticket you present to gain access, usually included in a request's 'Authorization' header.
API key
A secret code that identifies you as an authorized user of a web service. It's often sent as part of a web request, either in a special header or as part of the web address.
Query parameter
Information added to the end of a web address after a '?' symbol, used to filter or specify details for a request. For example, in 'example.com/search?query=cats', 'query' is the parameter and 'cats' is its value.
Basic auth
A simple authentication method where a username and password are sent with each request, typically encoded in a specific way.
OAuth 2.0
A widely used standard for secure access delegation. It allows a user to grant a website or application access to their information on another website without giving away their password. Think of 'Login with Google' or 'Login with Facebook'.
PKCE
Proof Key for Code Exchange. An extra security step for OAuth 2.0, especially useful for mobile apps, that helps prevent certain types of attacks by adding an additional verification code.
Scopes
Permissions requested during OAuth 2.0. They define what actions an application is allowed to perform on your behalf (e.g., 'read your profile', 'post on your wall').
Redirect URL
The web address where a user is sent back after successfully authenticating with an OAuth provider. It must be pre-registered with the provider for security reasons.
Connector gateway
A secure component within Lovable that acts as an intermediary, handling requests to external web services and injecting sensitive credentials without exposing them directly.

Where people get stuck

  • Deleting a custom connector is permanent and will remove its definition and all existing connections, causing any apps using those connections to stop working.
  • You cannot switch a connector's authentication method between OAuth 2.0 and credential-based methods (like API keys) after creation, as this would break existing connections.
  • Existing credential field keys are locked after creation; changing them would break existing connections.
  • Never put sensitive information like API keys or tokens directly into knowledge files; Lovable handles authentication separately.
  • Ensure your API base URL is an 'https://' address for security.
  • If using OAuth 2.0, you must add Lovable's provided redirect URL exactly to your service's OAuth app settings.

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.