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

# Setup

> Connect to your Gusto app for OAuth.

Refold offers both **Key Based** and **OAuth 2.0** integration for Gusto. In this guide, we will look at the OAuth App setup process.

To setup your Gusto app in Refold for OAuth, you will need the following credentials from your [Gusto Developer account](https://dev.gusto.com/dashboard):

* Client ID
* Client Secret
* Scopes

### Pre-requisites

1. Gusto Developer account. You can create one [here](https://dev.gusto.com/dashboard).

<Info>If you haven't already created an app in Gusto, you'd need to create one.</Info>

### Creating an app in Gusto

To create a Gusto app and acquire the above mentioned credentials, please follow the steps mentioned below:

1. Log in to your [Gusto Developer account](https://dev.gusto.com/dashboard).
2. Click on the `Applications` icon in the side menu.

<img height="200" src="https://mintcdn.com/cobalt-55/rCTCKBbhiwGPdeWb/images/gusto/gusto_navigation.png?fit=max&auto=format&n=rCTCKBbhiwGPdeWb&q=85&s=ff27a99f75a4a772c5efd19f5640a362" alt="Navigation for App setup" data-path="images/gusto/gusto_navigation.png" />

3. Go to your [`Apps catalog`](https://app.gocobalt.io/apps) in **Refold** > Search for `Gusto` > `Settings` > `Use your credentials` > `Callback Url` > Copy it.
4. Click on `+ Create application` button in the right, enter the **App Name**, paste the Callback Url under **Redirect URI**, select a **Category** and click on `Create`.
5. Go to the App **Details** tab > Scroll down > Copy the **Client ID** and **Secret**.

<img height="200" src="https://mintcdn.com/cobalt-55/rCTCKBbhiwGPdeWb/images/gusto/gusto_credentials.png?fit=max&auto=format&n=rCTCKBbhiwGPdeWb&q=85&s=c122d8013ba3723e06200b51c1b900e0" alt="Getting Credentials" data-path="images/gusto/gusto_credentials.png" />

#### Configuring credentials in Refold

App settings page lets you configure the authentication settings for an `OAuth 2.0` based application. For your customers to provide you authorization to access their data,
they would first need to install your application. This page lets you set up your application credentials.

<img height="200" src="https://mintcdn.com/cobalt-55/rCTCKBbhiwGPdeWb/images/gusto/gusto_cobalt.png?fit=max&auto=format&n=rCTCKBbhiwGPdeWb&q=85&s=e02eecfced589062698483c27f71834a" alt="Setting up application client credentials" data-path="images/gusto/gusto_cobalt.png" />

Provide the acquired Client ID and Client Secret under Settings of the app and save it.

<Tip>
  To get access to your Production Credentials for Gusto App, you need to submit app for review to Gusto. Learn more about the Review and it's requirements [here](https://docs.gusto.com/app-integrations/docs/introduction#review).
</Tip>

#### Actions and triggers

Once the above setup is completed, you can create orchestrations of your use-cases using Gusto actions and triggers. Following are the set of Gusto actions and triggers
supported by Refold.

<Tabs>
  <Tab title="Actions">
    <AccordionGroup>
      <Accordion title="Employee">
        1. **List Employees** - Get all employees in Gusto.
        2. **Create Employee** - Create an employee in Gusto.
      </Accordion>

      <Accordion title="Payroll">
        3. **List Payrolls** - Get all payrolls in Gusto.
        4. **Prepare a Payroll for Update** - Prepare a payroll for update in Gusto.
        5. **Get Payroll by ID** - Get a payroll by ID in Gusto.
        6. **Update Payroll By Id** - Update a payroll by id in Gusto.
      </Accordion>

      <Accordion title="Others">
        7. **HTTP Request** - Make HTTP API calls to any Gusto documented REST APIs.
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Triggers">
    There are no triggers in this application.
  </Tab>
</Tabs>
