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

To setup your SurveyMonkey app in Refold for OAuth, you will need the following credentials from your [Survey Monkey Developer account](https://developer.surveymonkey.com/):

* Client ID
* Client Secret
* Scopes

### Pre-requisites

1. SurveyMonkey Developer account. You can create one [here](https://www.surveymonkey.com/sign-up).

### Required Settings

* **Mandatory Scopes**

1. surveys\_read
2. users\_read

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

### Creating an app in SurveyMonkey

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

1. Log in to your [Survey Monkey Developer account](https://developer.surveymonkey.com/).
2. Click on the `My Apps` option in the top nav bar.

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

3. Click on `Add a New App` button in the right.
4. Enter the `App Nickname` and `App Creator` email > Select an `App Type` as **Public** or **Private** depending on your requirements and click `Create App`.

<Info>
  Public App needs to be submitted for review before SurveyMonkey users outside your organization can use it. Learn more about App Type [here](https://developer.surveymonkey.com/faq/).
</Info>

5. Go to your [`Apps catalog`](https://app.gocobalt.io/apps) in **Refold** > Search for `Survey Monkey` > `Settings` > `Use your credentials` > `Callback Url` > Copy it.
6. Go to `Settings` in the OAuth app, paste the Callback Url under `OAuth Redirect URL` and click on `Submit Changes`.
7. Scroll down to the **Scopes** section, select and mark the **mandatory scopes** provided in your Refold Survey Monkey settings page as **Required** and click on the `Update Scopes` button.

<img height="200" src="https://mintcdn.com/cobalt-55/z_Cm6DgpvP5zfZT8/images/Surveymonkey/survey_config.png?fit=max&auto=format&n=z_Cm6DgpvP5zfZT8&q=85&s=b365c7005587e87a06675f907935b73d" alt="Setting up Survey Monkey Developer app" data-path="images/Surveymonkey/survey_config.png" />

8. Scroll to the **Credentials** section and copy the **Client ID** and **Secret**.

<img height="200" src="https://mintcdn.com/cobalt-55/z_Cm6DgpvP5zfZT8/images/Surveymonkey/survey_credentials.png?fit=max&auto=format&n=z_Cm6DgpvP5zfZT8&q=85&s=5ef924d0c0486fbf868217a30eb252e7" alt="Getting Credentials" data-path="images/Surveymonkey/survey_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/z_Cm6DgpvP5zfZT8/images/Surveymonkey/survey_cobalt.png?fit=max&auto=format&n=z_Cm6DgpvP5zfZT8&q=85&s=dea6f9e5e717420faad69c6507a9f316" alt="Setting up application client credentials" data-path="images/Surveymonkey/survey_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/z_Cm6DgpvP5zfZT8/images/Surveymonkey/survey_scopes.png?fit=max&auto=format&n=z_Cm6DgpvP5zfZT8&q=85&s=f2313a3da8409d9732b568608e57d5cf" alt="OAuth Scopes" data-path="images/Surveymonkey/survey_scopes.png" />

Once the scopes has been added to the application in Refold, go to your [Survey Monkey Developer account](https://developer.surveymonkey.com/) and update the scopes as added on Refold.

Select the OAuth App created for Refold > Click on `Scopes` under **Settings** > Add the scopes as added in Refold > Click on `Update 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. And, the scopes selected here are
  identical to the ones selected in the platform.
</Warning>

#### Actions and triggers

Once the above setup is completed, you can create orchestrations of your use-cases using SurveyMonkey actions and triggers. An action with any API of SurveyMonkey can be created by using the **HTTP Request** Action.
