> ## 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.

# Freshbooks

export const title_0 = "FreshBooks";

## Prerequisites

Before you can add the connection, you need to register an OAuth application with FreshBooks. You must be signed in to a FreshBooks account that has admin access.

<Steps>
  <Step>
    Go to the [FreshBooks developer portal](https://my.freshbooks.com/#/developer) and sign in.
  </Step>

  <Step>
    Click **Create New App**.
  </Step>

  <Step>
    Complete the required fields:

    * **Name**–the name of your application.
    * **Description**–(optional) a short description of your application.
    * **Redirect URI**–set this to *[https://oauth.cdata.com/oauth/](https://oauth.cdata.com/oauth/)*.
  </Step>

  <Step>
    Save the application.
  </Step>

  <Step>
    On the application page, scroll to **App Settings** to find the **Client Id** and **Client Secret**. Make note of these values.
  </Step>
</Steps>

## Setup Guide

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

<Steps>
  <Step>
    Open the **Sources** page of the Connect AI navigation menu.
  </Step>

  <Step>
    Click **+ Add Connection** in the upper-right corner.
  </Step>

  <Step>
    Type *FreshBooks* into the search field, then click the data source name.
  </Step>

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

  <Step>
    In Connect AI, enter the **OAuth Client Id** and **OAuth Client Secret** obtained from FreshBooks.
  </Step>

  <Step>
    Click **Sign in** to connect securely through OAuth. This action opens the FreshBooks sign-in page in a new tab.
  </Step>

  <Step>
    Log in to your FreshBooks account and provide the requested permissions (if applicable).
  </Step>

  <Step>
    Connect AI **Add {title_0} Connection** ページ上部の、**Save & Test** をクリックします。

    * 接続テストに成功すると、コネクションが作成されたことを示す**Connection successfully saved** というメッセージが表示されます。**Edit Connection** ページの**Status** も**Authenticated** に変わります。**Edit Connection** ページの右ペインにある**Data Model** タブで、成功したコネクションのデータモデルを表示します。
    * 接続テストに失敗した場合は、入力したログイン情報に余分なスペースや文字がないかを確認してください。Connect AI は、データが不足している必須フィールドの下にエラーメッセージを表示します。一部のデータソースでは、ソースのWeb サイトに直接サインインする必要があります。サインインしていない場合は、**Sign in** ボタンの下にエラーメッセージが表示されます。エラーを修正し、もう一度試してください。
    * 失敗したコネクションは下書きとして保存され、**Status** は**Not Authenticated** になります。後でコネクションに戻って認証することができます。
  </Step>
</Steps>
