Step One: Setting Up Authorization

Setting up OAuth 2.0 requires that you take some steps within your development environment and in other locations. If any of the steps are unfamiliar, you can consult Salesforce Help or the OAuth 2.0 documentation.

  1. Decide where to create your connected app.

    Your connected app doesn’t have to reside in the same organization as your users. The connected app you create can be used to sign in to any organization.

  2. From Setup in the appropriate organization, enter Apps in the Quick Find box, then select Apps.

  3. In the Connected Apps section, click New.

  4. Enter a connected app name.

  5. Enter an API Name.

  6. Enter the contact email, as well as any other information appropriate to your application.

  7. Select API (Enable OAuth Settings).

  8. Enter a callback URL.

    It must be secure, so begin the URL with https://, not http://.

    For development environments, the callback URL is generally made up of the instance plus whatever URL you want the user to be redirected to.

    https://<yourInstance>.salesforce.com/ConnectedTest/oauth/_callback.

  9. Enter an OAuth scope. Select the scope you want your connected app to allow access to.

  10. Click Save.

    The Consumer Key is created and displayed, and a client secret is created (click the link to reveal it).

You need the Consumer Key and Consumer Secret for the next step, connecting with OAuth.

  • Consumer Key = client_id
  • Consumer Secret = client_secret