# Marketo

### Connect to Marketo

1\. Go to the **Resources** page and click the <img src="https://3574406564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MB_fx7PCUqvFEdrucJC%2Fuploads%2Fct5RJC2cjHhrvymOWWGx%2Fimage.png?alt=media&#x26;token=b4ff0c44-5510-49d1-97dd-a155af254113" alt="" data-size="line">  button.&#x20;

2\. Select **Marketo**.

3\. Enter your account credentials and click **Connect**.&#x20;

{% hint style="info" %}
**Step 1: (Optional) whitelist Acho's IP address**

If you don't have IP Restriction enabled in Marketo, skip this step.

If you have IP Restriction enabled in Marketo, you'll need to whitelist the Acho's service IP address `10.128.15.195`. Whitelist it by following the Marketo documentation for [allowlisting IP addresses](https://docs.marketo.com/display/public/DOCS/Create+an+Allowlist+for+IP-Based+API+Access) for API based access.

**Step 2: Create an API-only Marketo User Role**[**​**](https://docs.airbyte.com/integrations/sources/marketo#step-2-create-an-api-only-marketo-user-role)

Follow the [Marketo documentation for creating an API-only Marketo User Role](https://docs.marketo.com/display/public/DOCS/Create+an+API+Only+User+Role).

**Step 3: Create an Acho Marketo API-only user**[**​**](https://docs.airbyte.com/integrations/sources/marketo#step-3-create-an-airbyte-marketo-api-only-user)

Follow the [Marketo documentation to create an API only user](https://docs.marketo.com/display/public/DOCS/Create+an+API+Only+User)

**Step 4: Create a Marketo API custom service**

Follow the [Marketo documentation for creating a custom service for use with a REST API](https://docs.marketo.com/display/public/DOCS/Create+a+Custom+Service+for+Use+with+ReST+API).

Make sure to follow the "**Credentials for API Access"** section in the Marketo docs to generate a **Client ID** and **Client Secret.** Once generated, copy those credentials and keep them handy for use in the Acho UI later.

**Step 5: Obtain your Endpoint and Identity URLs provided by Marketo**[**​**](https://docs.airbyte.com/integrations/sources/marketo#step-5-obtain-your-endpoint-and-identity-urls-provided-by-marketo)

Follow the [Marketo documentation for obtaining your base URL](https://developers.marketo.com/rest-api/base-url/). Specifically, copy your **Endpoint** without "/rest" and keep them handy for use in the Acho UI.
{% endhint %}

4\. Choose tables to import and click **Finish Setup**.&#x20;

5\. You will see a  <img src="https://3574406564-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MB_fx7PCUqvFEdrucJC%2F-MgBh5PshcmRFk38itib%2F-MgBo4LSmdK4OS-NqLZy%2Fsyncing.png?alt=media&#x26;token=452494f9-e4be-48fa-9644-bee7d969c46c" alt="" data-size="line"> icon next to your resource. It may take a few minutes to several hours depending on the data size and the number of your tables. Once your data is ready, you will receive a notification email.&#x20;

### Supported table <a href="#output-schema" id="output-schema"></a>

* **activities\_X** where X is an activity type contains information about lead activities of the type X. For example, activities\_send\_email contains information about lead activities related to the activity type `send_email`. See the [Marketo docs](https://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Activities/getLeadActivitiesUsingGET) for a detailed explanation of what each column means.
* **activity\_types.** Contains metadata about activity types. See the [Marketo docs](https://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Activities/getAllActivityTypesUsingGET) for a detailed explanation of columns.
* **campaigns.** Contains info about your Marketo campaigns. [Marketo docs](https://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Campaigns/getCampaignsUsingGET).
* **leads.** Contains info about your Marketo leads. [Marketo docs](https://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Leads/getLeadByIdUsingGET).
* **lists.** Contains info about your Marketo static lists. [Marketo docs](https://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Static_Lists/getListByIdUsingGET).
* **programs.** Contins info about your Marketo programs. [Marketo docs](https://developers.marketo.com/rest-api/endpoint-reference/asset-endpoint-reference/#!/Programs/browseProgramsUsingGET).
