To create a connected Salesforce app, follow these steps:
Log in to Salesforce with your developper account
In the drop-down list of the account (in the upper-right corner), select Setup
In the left-hand pane, search for: App Manager and open it
Click on “New connected App”
On the New Connected App page, fill the following required fields under Basic Information:
Connected App Name. For example, "test". The connected app name must be unique within your org. If the connected app was created in the Spring ‘14 release or later, you can reuse the name of a deleted connected app.
Only letters, numbers, and underscores are allowed, also avoid using names which ends with "builder".
API name. For example, "test".
Contact Email. your email.
Go to API (Enable OAuth Settings) and select Enable OAuth Settings.
In the Callback URL field, enter https://login.salesforce.com/services/oauth2/token for a production Org and https://test.salesforce.com/services/oauth2/token for a Sandbox Org. If you have a custom domain enabled on your org, you must use the custom URL https://yourcustomdomain.my.salesforce.com/services/oauth2/token
In the Selected OAuth Scopes field, select Manage user data via APIs (api) and then click Add.
Click the Save button to save the new Connected App.
2. Manage your connected app
On the new app that you just created, click Manage
On the page that opens, click the Edit Policies button.
Set IP Relaxation to: Relax IP Restrictions
Set Permitted Users to: All users may self-authorize
3. Generate an initial access token
Go back to the Connected Apps list, find the app that you just created then click on the "view" button on the right.
Scroll to the sectionInitial Access Token for Dynamic Client Registration, and click the Generate button to generate an initial access token. Salesforce requires this token to authenticate the client app's request at the dynamic client registration endpoint.
4. Get Consumer Key and Consumer Secret key
Go to the API (Enable OAuth Settings) section, and note down the Consumer Key and Consumer Secret.