Duration
15 minutes
Goals
An app that accesses Salesforce data has two parts: the external app that runs on the client device and the Connected App that exists on the Salesforce server. The Connected App contains identity and permission information that Salesforce uses to decide whether to allow an external connection. This exercise shows you how to create a Connected App inside Salesforce.
Steps
Below are the step-by-step instructions to implement the exercise.
Create a Connected App
In this section, you will create a Connected App.
- Open a web browser and login to your Salesforce account.
- Verify that you are on the Setup page. You should see a navigation menu on the left side containing headings like Administer, Build, Deploy, etc. If you do not see this menu, click on the Setup link in the upper-right corner of the page header.
- In the left-side menu, navigate to Build > Create > Apps.
- In the Connected Apps section of the main content area of the page, click on the New button.
- Choose a Connected App Name. The name appears in the Salesforce web interface so it should describe the app; however, it is not used by the external portion of the app for API access.
- Choose an API Name. This name is required; however, it is not used by the external portion of the app for API access.
- Enter your Contact Email.
-
Setup OAuth:
- Check the Enable OAuth Settings box.
- Enter a Callback URL. You can create your own or use this one that has been tested to work:
com.xamarin:/callback
- Add
Access and manage your data (api)
to the Selected OAuth Scopes. - Add
Access your basic information (id, profile, email, address, phone)
to the Selected OAuth Scopes. - Add
Perform requests on your behalf at any time (refresh_token, offline_access)
to the Selected OAuth Scopes.
- Click the Save button, then click the Continue button.
- [Optional] Record your Consumer Key, Consumer Secret, and Callback URL somewhere so you will have them available later if you decide to write the external portion of this app.
Summary
This exercise set up the server-side portion of an app. You now have all the information you need to authorize an external app to access Salesforce: Consumer Key, Consumer Secret, and Callback URL.