Lecca.io LogoLecca.io
Connections

Create API Key Connection

Use an API key connection when needing to authenticate with a third party app using an API key

We are working on a CLI to make this easier

Create connections folder

Locate the your app folder in the apps directory and add a new connections folder if it doesn't exist already.

your-new-app.api-key.ts
your-new-app.app.ts

Create connection file

Create a new file within your app's connection folder. For an api key connection, call it your-new-app.api-key.ts, replacing your-new-app with your app id (which should match your app file).

Add your own values. We provided mock data to help initialize the process.

import { createApiKeyConnection } from "@lecca-io/toolkit";
 
export const yourNewAppApiKey = createApiKeyConnection({
  id: "your-new-app_connection_api-key",
  name: "Api Key",
  description: "Connect using an API Key",
});
  1. export const yourNewAppBasicAuth replacing yourNewApp with your app name.

  2. Add an id: your-new-app_connection_api-key

    • Make sure the id follows the format <app-id>_connection_api-key.
  3. You don't need to modify the name or description.

Add new connection to the app's connections property

your-new-app.app.ts
import { createApp } from "@lecca-io/toolkit";
 
export const yourNewApp = createApp({
  ...
  actions: [],
  triggers: [],
  connections: [yourNewAppApiKey], 
});

On this page