Newer Version Available
Quick Start Prerequisites
Sign Up for Developer Edition
Developer Edition provides a free and easy solution to obtain a Salesforce org for testing and development. If you already have an org suited for development, such as a sandbox, you can also use it to follow along with the quick start instructions.
Sign up for Developer Edition at https://developer.salesforce.com/signup. After signing up, you receive an email with password information.
Confirm That You Have API Enabled Permission
Confirm that you have API Enabled as a permission for your user profile by following the instructions in User Permissions in Salesforce Help.
Create a Connected App
Follow the instructions in Create a Connected App in Salesforce Help, and configure the app as needed. To follow this quick start, you must complete the first two tasks: Configure Basic Connected App Settings and Enable OAuth Settings for API Integration.
While enabling OAuth settings, take note of these details that are useful to complete this quick start.
- The specific callback URL isn’t important for this quick start, which uses the username-password authorization flow. If you don’t have a specific callback URL to use, enter https://localhost.
- Assign the Access and manage your data OAuth scope to your connected app for API access. You can also assign other scopes if needed for other reasons.
- Introspection isn’t supported by the username-password authorization flow used in this quick start, so it isn’t necessary to enable the Introspect all tokens option.
Get a Consumer Key and a Consumer Secret
Obtain the consumer key and consumer secret of the connected app that you created.
- From Setup, enter App Manager in the Quick Find box, and then select App Manager.
- Click the dropdown menu for the connected app that you created, and select View.
- If the values for the Consumer Key and Consumer Secret fields are hidden, click Click to reveal.
- Copy the Consumer Key and Consumer Secret values and save them for later use in this quick start.
Familiarize Yourself with cURL
The examples in this guide use cURL to send requests. Even if you’re not using cURL, familiarize yourself with it enough to be able to understand the examples and translate them into the tool that you are using. See the documentation at curl.haxx.se/.