# Use a connector in your app

Let your published app call a connected service with your account, or let each visitor sign in with their own.

A connector can do more than help Lyna AI build. Your published app can call the same service when it runs, with your account or with the account of each visitor. The keys stay with the connection and never reach your app's code or your visitors' browsers.

## What you can do

The **Use in** block on a connector's page lists the places a connection works. A row appears only when the service offers it.

| Row                          | Who the call acts as                | What it needs                                   |
| ---------------------------- | ----------------------------------- | ----------------------------------------------- |
| **This chat**                | You, while Lyna AI builds           | A connection                                    |
| **Your app**                 | You, whoever opens your app         | Your details for the service, and a project key |
| **Each visitor of your app** | The visitor, with their own account | Sign-in in your app, and a project key          |

Linear and Notion offer **Each visitor of your app**. Other services that serve your app offer **Your app**.

## Use it with your account

1. ### Open the connector

   Open the **+** menu of the chat, choose **Connectors**, then pick a connector. You need edit access to the project.
2. ### Add your details

   Under **Your app**, choose **Set up**. Fill in each field and choose **Connect**. The form links to the service's page on where to find them. Your details are saved encrypted and are never shown again.

   These details are separate from the ones this chat uses, so the chat keeps its own sign-in.
3. ### Create a project key

   Choose **Create key**. The project key lets your app's server functions reach the connections you turned on, and is shown only once.

   - **Your project has a database.** Its server functions get the key right away. You only need a copy if something else calls your connected services.
   - **Your project has no database yet.** Copy the key and keep it safe. Once your project has a database, add it to the secrets of your server functions, or choose **Replace key** so they get a new one.
4. ### Ask for the feature

   Tell Lyna AI what your app should do, for example "Show my open Linear issues on a page of my app." It writes a server function that calls the service, and a page that calls the function.

## Let each visitor use their own account

1. ### Add sign-in to your app

   Your app has to know who each visitor is. If it has no sign-in yet, choose **Add sign-in** and Lyna AI starts on it in the chat.
2. ### Turn it on

   When the row reads **Ready to turn on**, choose **Turn on**. Then create a project key if your project has none.
3. ### Ask for the feature

   Ask Lyna AI for a page where a visitor connects their account, for example "Let each visitor connect their Notion account and see their own pages." A visitor signs in on the service's own page, and your app acts for them, never with your account.

**Remove all visitors** deletes every visitor's sign-in to that connector in this project. They can sign in again the next time your app asks.

## Keep it safe

- The project key is a secret of your server functions. Never put it in a page of your app or in a value the browser can read. Lyna AI refuses to write a value you saved into your project's code.
- A call through **Your app** uses your account, so it can do what your details allow, for anyone your app lets call it. Start with a key limited to what your app needs.
- **Replace key** stops the old key at once. Anywhere you saved the old one needs the new one.
- Taking a connection out of a project removes its visitors' sign-ins in that project.

> [!WARNING]
>
> **Calls are real**
>
> Your app's calls change real data in the service, and any charge from the provider goes to your plan with them. Lyna AI's approvals apply to the chat, not to your running app, so decide in your app's own code who may trigger a call.

## Limits

- Each connection takes up to 1000 calls a minute from a project, and each address up to 120.
- An answer from a service can be at most 2 MB.
- A connection reaches only what the service allows for the details you saved.
- Each project has one live project key, shared by its connections.

## Troubleshooting

| What you see                                                     | What it means and what to do                                                                                                         |
| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| **Needs a key**                                                  | Your project has no project key yet. Choose **Create key**.                                                                          |
| **Not available yet**                                            | Visitors cannot sign in to this service yet. Use **Your app**, or check back later.                                                  |
| **Needs sign-in**                                                | Your app has no sign-in. Choose **Add sign-in**.                                                                                     |
| The page says it could not save the key in your server functions | The project key exists, but your functions do not have it. Choose **Replace key** to try again, or add it to their secrets yourself. |
| Your function says its secrets are missing                       | The key was made before your project had a database. Choose **Replace key**.                                                         |
| A call answers that the details are missing                      | The connection has no details saved for your app. Choose **Set up** under **Your app**.                                              |

## Related

- [Connectors](/integrations/connectors): Connect your own accounts and tools.
- [Edge functions](/features/cloud/edge-functions): Run server code for your published app.
