> ## Documentation Index
> Fetch the complete documentation index at: https://developer.dittowords.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

Ditto’s developer integrations require an API key to authenticate requests. You can manage your API keys from the [**Developer Integrations**](https://app.dittowords.com/developers) page.

API keys enable programmatic access to all data in your workspace, so be sure to keep them secure. Don’t share your API keys in publicly accessible places such as GitHub or client-side code.

## Generate an API key

1. Navigate to the [**Developers**](https://app.dittowords.com/developers) page.
2. Enable developer integrations for your workspace if they haven’t been enabled already.
3. Under the **API Keys** section, click **+ Create API key**.
4. Enter a name for the API key and click the **Create** button.
5. Copy the value of the API key to your clipboard and store it somewhere safe; you won’t be able to access it again after closing the modal.

## Authenticate API requests

Authorize requests to the Ditto API by passing an API key in an `Authorization` header:

```
"Authorization": "<YOUR_API_KEY>"
```

Here is an example request to the `/projects` endpoint:

```sh theme={null}
curl -X GET \
 --header "Authorization: <YOUR_API_KEY>" \
 "https://api.dittowords.com/v2/projects"
```

## Authenticate the Ditto CLI

The first time you run the CLI, you’ll be asked to provide an API key.

See the [CLI documentation](/cli-reference/configuration) for more information.
