> ## Documentation Index
> Fetch the complete documentation index at: https://nango-wari-migrated-bigcommerce-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Fern (Public API) - How do I link my account?

> Generate a Fern API key and connect it to Nango

# Overview

To authenticate with the Fern Public API, you need:

1. **Docs URL** - The domain of your Fern docs site (e.g. `docs.example.com`)
2. **Fern API key** - Generated by running `fern token` in your terminal

This guide walks you through generating your Fern API key and connecting it to Nango.

### Prerequisites

* The [Fern CLI](https://buildwithfern.com/learn/cli-api/cli/overview) installed (`npm install -g fern-api`)
* A Fern account logged in via `fern login`

### Instructions

#### Step 1: Generate your Fern API key

Run the following command in your terminal:

```bash theme={null}
fern token
```

This outputs your `FERN_API_KEY`. Copy and store it securely — treat it like a password.

#### Step 2: Find your docs URL

Your docs URL is the hostname of your Fern docs site, for example `docs.example.com`.

#### Step 3: Enter credentials in the Connect UI

1. Open the form where you need to authenticate with Fern (Public API).
2. Enter your **Docs URL** and **Fern API key** in their respective fields.
3. Submit the form, and you should be successfully authenticated.

<img src="https://mintcdn.com/nango-wari-migrated-bigcommerce-docs/R8TvGtExx5BifkNc/api-integrations/fern/form.png?fit=max&auto=format&n=R8TvGtExx5BifkNc&q=85&s=319d4335a91d07d9b0de34e8391c11f9" style={{maxWidth: "450px" }} width="500" height="701" data-path="api-integrations/fern/form.png" />

You are now connected to Fern (Public API).
