# Plaid

## 1. How to connect to Plaid?

You can follow the following steps to build a connection with your Plaid account. If you need any helps to set up your integration, please [contact us](/master.md#how-to-contact-us).

1\. Go to the **Resources** page and click the **Add Resource** button.

2\. In the "Select a data source" step, select **Plaid** under **Apps**.

3\. In the "Configure the data source" step, enter the following information:

* **`Client ID:`** the client ID of your Plaid account. See [here](#b.-get-client-id-and-api-key) to find your client ID.
* **`API Key:`** The value of the access token generated. See [here](#b.-get-client-id-and-api-key) to get an access token.
* **`Access Token:`** The value of the access token generated. See [here](#c.-create-an-access-token) to get an access token.
* **`Environment:`** the environment of your access token (production, development, or sandbox). See [here](#b.-get-client-id-and-api-key) to check your environment.&#x20;

4\. In the "Select the tables", choose tables that you want to connect. See [here](#4.-available-tables) for more details on each table.

5\. Click **Finish Setup**. You will see a  <img src="/files/-MgBo4LSmdK4OS-NqLZy" alt="" data-size="line"> icon next to your Plaid resource. It may take a few minutes to several hours depending on the data size and the number of your tables. Once your APP's data is ready, you will receive a notification email.&#x20;

## 2. How to get an API Key for Plaid?

To allow Acho to connect to your Plaid account, you have to acquire the client ID, an API key, and an access token. Here are the instructions about how to acquire it.

#### **a. Create a Plaid account:**&#x20;

Go to [Plaid's website](https://plaid.com/) and click **Get API Keys**. Follow the instructions to create an account.

![](/files/-MgH_Bizk4lvJiIPD_f1)

#### **b. Get Client id and API key:**&#x20;

Go to the [keys page](https://dashboard.plaid.com/team/keys) and you will find the client id and your API Key. You can copy the API key from one of the following environments (Production, Development, and Sandbox) and paste it to Acho's configuration page.  &#x20;

![](/files/-MgHaq1rVP9hlEyKL8Js)

#### **c. Create an Access Token:**&#x20;

You have to create a public token key first and then you can create an access token.

* **Create a public key:** Make this API call described in [plaid docs](https://plaid.com/docs/api/sandbox/#sandboxpublic_tokencreate)

  ```bash
    curl --location --request POST 'https://sandbox.plaid.com/sandbox/public_token/create' \
        --header 'Content-Type: application/json;charset=UTF-16' \
        --data-raw '{
            "client_id": "<your-client-id>",
            "secret": "<your-sandbox-api-key>",
            "institution_id": "ins_43",
            "initial_products": ["auth", "transactions"]
        }'
  ```
* **Exchange public key for an access token:** Make this API call described in [plaid docs](https://plaid.com/docs/api/tokens/#itempublic_tokenexchange). The public token used in this request is the token returned in the response of the previous request. This request will return an `access_token`, which is the last field we need to generate for the config for this source!

{% hint style="warning" %}
If you need helps to create the access token, please [contact us](/master.md#how-to-contact-us).
{% endhint %}

## 3. How to set up Data Sync?

Acho supports creating schedulers to retrieve the latest data from your Plaid account at a certain time interval. To see more details, you can visit [here](https://docs.acho.io/data-sync/untitled).

## 4. Available Tables

* [Balance](https://plaid.com/docs/api/products/#balance)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.acho.io/acho-studio/resources/import-data/plaid.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
