# Steps to create connected app

In the Lightning Setup UI, search for *App Manager* and click on *New Connected App* and follow the below steps:&#x20;

**Basic Information section**:

○ All mandatory field's values are discussed below.

○ *Connected App Name* can be given as *protecto\_app*

○ *API Name* field gets auto filled.

○ *Contact Email* can be support email of organization.

![](https://323347149-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw6GKvSvsZfGhtiQWrONh%2Fuploads%2FgVg0jCVm8LWmbBiHXvXB%2Fimage.png?alt=media\&token=39e0d537-6ec0-4a03-ad55-5bc62d65b500)

&#x20;

**API (Enable OAuth Settings) section**:

○ Check mark *Enable OAuth Settings,* to get more options for the same.

○ *Callback URL* can be set to anything, e.g.: [https://protecto.ai](https://protecto.ai/)

○ In *Selected OAuth Scopes* add *Manage user data via APIs* permission.

○ Check mark below fields:

▪ *Require Secret for Web Server Flow*

▪ *Require Secret for Refresh Token Flow*

![](https://323347149-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw6GKvSvsZfGhtiQWrONh%2Fuploads%2FMNpeVuruRE3aF0elXtwx%2Fimage.png?alt=media\&token=c9c15ca3-2b71-471a-a747-ee03415722f3)

○ Click on *Save* to save the connected app.

▪ We get this message: <mark style="color:red;">Changes can take up to 10 minutes to take effect. Deleting a parent org also deletes all connected apps with OAuth settings enabled.</mark>

▪ Click on *continue*

▪ Click on *Manage Consumer Details*

![](https://323347149-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw6GKvSvsZfGhtiQWrONh%2Fuploads%2Fs6kj5tmlwePQ8IR04qt9%2Fimage.png?alt=media\&token=7057b7b3-a3f2-4bf5-bfb6-271a6b1ec88e)

▪ Use the verification code obtained via mail (of admin user) to verify.

▪ New screen opens containing Consumer Details.

▪ Copy the ***Consumer Key*** and ***Consumer Secret*** in a safe place, as it will be used later on.

▪ In the search box, search for *App Manager* and open the same. Find protecto\_app, and click the dropdown (right corner). Click on view.

&#x20;![](https://323347149-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw6GKvSvsZfGhtiQWrONh%2Fuploads%2F4BdKrzc1qwJNdIVhZbGK%2Fimage.png?alt=media\&token=8e299d81-42ae-4ba0-a909-0034eddb127d)

&#x20;

▪ In the view screen, scroll down to *Initial Access Token for Dynamic Client Registration* section, click Generate button for *Initial Access Token*

![](https://323347149-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw6GKvSvsZfGhtiQWrONh%2Fuploads%2FjqjaNV9iueMKBNxDVYWH%2Fimage.png?alt=media\&token=aae57e0c-6d97-49e0-ba84-61b92ea0c022)

&#x20;   •   Read the pop-up and click *OK.*

○ Search again for *Manage Connected Apps* in search box and click on the same

○ Find the newly created *protecto\_app* and click *edit* button ○

&#x20;In **OAuth policies**,&#x20;

▪ set *IP Relaxations* to *Relax IP restrictions*

▪ Set Permitted Users to *All users may self-authorize*.

![](https://323347149-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw6GKvSvsZfGhtiQWrONh%2Fuploads%2FF2wbQly2ThGKjO0vEpSv%2Fimage.png?alt=media\&token=2a6a4d0b-d10e-4eeb-b812-dc761d4056de)

○ Under Session Policies, set *Timeout Value* to *None.*

○ Save the same, and we are done creating the Connected app *protecto\_app*.

Now that we have created a connected app, Let's create a user with minimum access for running the Protecto product.
