Create a Connected App in Salesforce for OAuth

To use OAuth to authorize the API call to Salesforce, set up a connected app in Salesforce. The connected app generates a consumer key and secret that you can store in the EventBridge connection in AWS.

To create a connected app in Salesforce:

  1. Fill out the basic information by following the steps in Configure Basic Connected App Settings in Salesforce Help.
  2. In the API (Enable OAuth Settings) section, select Enable OAuth Settings.
  3. Enter the callback URL (endpoint) that Salesforce calls back to your application during OAuth. It’s the same URL as the OAuth redirect URI. Depending on which OAuth flow you use, the URL is typically the one that a user’s browser is redirected to after successful authorization. Because this URL is used for some OAuth flows to pass an access token, the URL must use secure HTTPS or a custom URI scheme.
  4. For OAuth scopes, select Manage user data via APIs.
  5. Keep Require Secret for the Web Server Flow selected. This option requires the app’s client secret in exchange for an access token.
  6. Keep Require Secret for Refresh Token Flow selected. This option requires the app’s client secret in the authorization request of a refresh token and the hybrid refresh token flow.
  7. Save your changes.

After you create the connected app, the app contains the consumer key and secret. It can take up to 10 minutes for the connected app to be ready for use.