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

# Harvest

## Setup Guide

Follow these steps to connect Harvest to your Connect AI account:

**Step 1**

Open the **Sources** page of the Connect AI navigation menu.

**Step 2**

Click **+ Add Connection** in the upper-right corner.

**Step 3**

Type *Harvest* into the search field, then click the data source name.

**Step 4**

On the **Basic Settings** tab of the new connection, enter a connection name or keep the default name.

**Step 5**

Enter your Harvest **Account Id**. To find it, log in to [Harvest ID](https://id.getharvest.com/developers) and open the **Developers** page. The Account ID is displayed alongside your personal access tokens and OAuth2 applications.

**Step 6**

Select the Auth Scheme, then proceed to the relevant section and follow those instructions.

## Authentication Methods

**OAuth**

To use OAuth authentication, you must create an OAuth2 application in Harvest ID:

**Step 1**

Log in to [Harvest ID](https://id.getharvest.com/developers) with your Administrator credentials and open the **Developers** page.

**Step 2**

Under **OAuth2 Applications**, click **Create New OAuth2 Application**.

**Step 3**

Complete the required fields:

* **Name**–the name of your application.
* **Redirect URL**–set this to *[https://oauth.cdata.com/oauth/](https://oauth.cdata.com/oauth/)*.
* **Products**–select **Harvest**.

**Step 4**

Click **Create Application**.

**Step 5**

On the application page, make note of the **Client ID** and **Client Secret**. The Client Secret is only shown once, so copy it immediately. In Connect AI, the Client ID is entered as the **OAuth Client Id** and the Client Secret as the **OAuth Client Secret**.

In Connect AI:

**Step 1**

Enter the **OAuth Client Id** and **OAuth Client Secret** obtained from Harvest.

**Step 2**

Click **Sign in** to connect securely through OAuth. This action opens the Harvest sign-in page in a new tab.

**Step 3**

Log in to your Harvest account and provide the requested permissions (if applicable).

**Step 4**

At the top of the Connect AI **Add Harvest Connection** page, click **Save & Test**.

* If the connection test succeeds, a **Connection successfully saved** message appears, indicating that your connection has been created. The **Status** on the **Edit Connection** page also changes to **Authenticated**. View the data model of your successful connection in the right pane of the **Edit Connection** page, in the **Data Model** tab.
* If the connection test fails, ensure that you entered your login information correctly with no stray spaces or other characters. Connect AI displays error messages under the required fields with missing data. Some data sources require that you sign in directly to the source website. If you did not, an error message appears under the **Sign in** button. Correct the errors and try again.
* Unsuccessful connections are saved as drafts and have a **Status** of **Not Authenticated**. You can return to the connection and authenticate it later.

**APIKey**

To use API Key authentication, first create a personal access token in Harvest ID:

**Step 1**

Log in to [Harvest ID](https://id.getharvest.com/developers) and open the **Developers** page.

**Step 2**

Under **Personal Access Tokens**, click **Create New Personal Access Token**.

**Step 3**

Enter a name for the token and select the Harvest product you want to access.

**Step 4**

Click **Create Personal Access Token**.

**Step 5**

Copy the token immediately and store it securely. It must be treated like a password.

In Connect AI:

**Step 1**

Enter the **API Key**.

**Step 2**

At the top of the Connect AI **Add Harvest Connection** page, click **Save & Test**.

* If the connection test succeeds, a **Connection successfully saved** message appears, indicating that your connection has been created. The **Status** on the **Edit Connection** page also changes to **Authenticated**. View the data model of your successful connection in the right pane of the **Edit Connection** page, in the **Data Model** tab.
* If the connection test fails, ensure that you entered your login information correctly with no stray spaces or other characters. Connect AI displays error messages under the required fields with missing data. Some data sources require that you sign in directly to the source website. If you did not, an error message appears under the **Sign in** button. Correct the errors and try again.
* Unsuccessful connections are saved as drafts and have a **Status** of **Not Authenticated**. You can return to the connection and authenticate it later.

> [!NOTE]
>
> Ready to try this connector? [Create a free Connect AI account](https://cloud-login.cdata.com/u/signup) and set up your first connection in minutes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.