> ## 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 Etsy app for OAuth.

To setup your Etsy app in Refold for OAuth, you will need the following credentials from your [Etsy Developer account](https://www.etsy.com/developers):

* Keystring
* Shared Secret

### Pre-requisites

1. Etsy Developer account. You can create one [here](https://www.etsy.com/in-en/join).

### Required Settings

* **Mandatory Scopes**

1. listings\_r
2. listings\_d
3. listings\_w
4. Transactions\_r

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

### Creating an app in Etsy

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

1. Log in to your [Etsy Developer account](https://www.etsy.com/developers).
2. Click on the `Manage your Apps` icon in the side menu and click `Create a New App` button.

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

3. Enter the App `Name`, `Description`, `Website URL` and other details and click on `Read Terms and Create App` button.
4. Copy the `Keystring`**(Client ID)** and `Shared Secret`**(Client Secret)** displayed.

<img height="200" src="https://mintcdn.com/cobalt-55/C3P12YsraPVmMY5N/images/Etsy/etsy_credentials.png?fit=max&auto=format&n=C3P12YsraPVmMY5N&q=85&s=308ad9ccb8dbc4b1b53e41a5697bf255" alt="Getting Credentials" data-path="images/Etsy/etsy_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/C3P12YsraPVmMY5N/images/Etsy/etsy_cobalt.png?fit=max&auto=format&n=C3P12YsraPVmMY5N&q=85&s=400518fd2e9eb72d9aed1a3e80169318" alt="Setting up application client credentials" data-path="images/Etsy/etsy_cobalt.png" />

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

#### Configuring Scopes

Refold lets you configure what permissions to ask from your users while they install your application. The scopes can be added or removed from the App settings page, under `Permissions & Scopes`
section.

For some applications Refold sets **mandatory scopes** which cannot be removed. Additional scopes can be selected from the drop down. Refold also has the provision to add any
custom scopes supported by the respective platform.

<img height="200" src="https://mintcdn.com/cobalt-55/C3P12YsraPVmMY5N/images/Etsy/etsy_scopes.png?fit=max&auto=format&n=C3P12YsraPVmMY5N&q=85&s=8e2789207890545f7f0252fdbc4b4f7a" alt="OAuth Scopes" data-path="images/Etsy/etsy_scopes.png" />

Once the scopes has been added to the application in Refold, the app will now request for access of the mentioned scopes.

<Warning>
  If you are facing scopes missing or invalid scope error. Make sure you are not passing any custom scope not supported by the platform.
</Warning>

#### App Approval for Etsy

Once the app is created in Etsy, it needs to be approved by the Etsy team before it can be used for OAuth.

If the keys are not approved in 3-4 Business days, you can contact the Etsy Developer team at [developers@etsy.com](mailto:developers@etsy.com) describing your **use-case**, **App name** and the **Keystring** of the App to be approved.

The app will be approved for `Personal Access` and since the app is only going to be used by a handful of Etsy members, then Commercial Access may not be required. Instead, these members can be added on as provisional users.

<Tip>
  Learn how to add provisional users to your app [here](https://groups.google.com/g/etsy-api-v2/c/_TA7DrM2uSU/m/rSs2INR9orQJ).
</Tip>

#### Actions and triggers

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

<Tabs>
  <Tab title="Actions">
    <AccordionGroup>
      <Accordion title="Listings">
        1. **Get Listing by Shop** -Get listing by shop in Etsy.
        2. **Create Draft Listing** - Create a listing for a Shop in Etsy.
        3. **Delete Listing** - Deletes a listing in Etsy.
        4. **Update Listing** - Update listing in Etsy.
      </Accordion>

      <Accordion title="Payments">
        5. **Get payments** - Get Payments of a shop in Etsy.
        6. **Get shop payment by receipt ID** - Get payment by receipt ID in Etsy.
      </Accordion>

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

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