# Gusto

> Source: https://truto.one/docs/integration-guides/gusto/

Gusto connects with OAuth 2.0 through a Gusto application you own.

:::callout{type="info"}
Only a primary admin or full access admin of the Gusto company can authorize the connection. Each authorization covers one company.
:::

## Install the Gusto integration

Install Gusto from [Available integrations](https://app.truto.one/integrations/available/29f8427d-a5ac-4101-86bf-86c04586bafc) in each environment you connect accounts from.

## Create a Gusto OAuth app

Truto doesn't ship a Gusto OAuth app of its own, so bring yours. Until you set its Client ID and Client Secret on the installed integration, the connect UI doesn't list Gusto. See [Until the app is configured](/docs/guides/integrations/overriding-oauth-credentials#until-the-app-is-configured).

1. Sign in to the [Gusto Developer Portal](https://dev.gusto.com) and create an application.
2. Add the redirect URL below to the application. You can change a demo application's redirect URLs on the **Applications** tab; for a production application, ask Gusto at developer@gusto.com.
3. Copy the application's client ID and secret, and enter them as the Client ID and Client Secret on the installed Gusto integration; see [Overriding OAuth credentials](/docs/guides/integrations/overriding-oauth-credentials#steps-to-overriding-oauth).

Redirect URL:

```text
https://api.truto.one/connect/gusto/callback
```

If you [use a redirect URL on your own domain](/docs/guides/integrations/overriding-oauth-credentials#use-a-redirect-url-on-your-own-domain), register that URL instead.

When you click **Install**, the second step shows the Redirect URL to add to your app and asks for its Client ID and Client Secret. If you skip it, add them later on the **Configuration** tab.

## Connect a Gusto account

1. In [Integrated Accounts](https://app.truto.one/integrated-accounts), click **Connect Account**.
   ![Click Connect Account](https://docs-assets.truto.one/truto-connect-account.png)
2. Enter a **Tenant ID** (your customer's ID; Truto creates the tenant if it is new), or pick one under **Existing tenant (optional)**. Check the **Environment** and the **Region** (where Truto places the account; Western North America by default). To open the link straight on Gusto, pick it under **Advanced settings** → **Integration (optional)**. Click **Get connection link**.
   ![Get connection link](https://docs-assets.truto.one/truto-connect-account-modal.png)
3. Click the open-in-new-tab button, or click **Copy** and send the link to your customer so they connect their own Gusto account. The link works for 7 days, until an account is connected with it.
   ![Share connection link](https://docs-assets.truto.one/truto-connect-account-link.png)
4. Click **Get Started** if it shows, then select **Gusto**.
5. Fill in the form and click **Connect**:

   | Field | Required | What to enter |
   |---|---|---|
   | **Gusto Environment** | Yes | Which Gusto API the account lives on. Pick **Demo** for a demo company connected through a demo application. Pick one of **Production**, **Demo**. Defaults to **Production**. |
6. Sign in to Gusto and allow access. If the user administers several companies, Gusto asks which one to connect.
7. Close the tab when you see **Connection successful**. The new account appears under **Integrated Accounts**. Click its Account ID to see its details and make API calls.
