---
schema_version: "1"
id: 755180ed34c5c33859a6b7174344ceb46d69dcd20477b532d7023a8454b8854a
title: Create a Connected App in Salesforce for OAuth
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/ev_relay_create_connected_app.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.ev_relay_create_connected_app.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 3c9940a328d309a6f2feac42584d7a3120de50212d6f87e8674b19a2160e9099
description: 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.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# 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. From Setup, enter External Client Apps in the Quick Find box, then select **Settings** in the External Client App section.
2. Turn on **Allow creation of connected apps**, if it's off.
3. Click **New Connected App**.
4. Enter a name.
5. Enter your contact email.
6. Optionally, fill out other fields as outlined in [Configure Basic Connected App Settings](https://help.salesforce.com/s/articleView?id=xcloud.connected_app_create_basics.htm&type=5&language=en_US).
7. In the API (Enable OAuth Settings) section, select **Enable OAuth Settings**.
8. Select **Enable for Device Flow**.
    
    A callback URL isn’t used in the device flow. However, when this flow is enabled, the value for the callback URL defaults to a placeholder.
9. For OAuth scopes, select **Manage user data via APIs**.
10. Keep **Require Secret for the Web Server Flow** selected. This option requires the app’s client secret in exchange for an access token.
11. 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.
12. Select **Enable Client Credentials Flow**.
13. When you understand the security risks, accept the warning.
14. Save your changes.
15. Click **Continue**.
16. Click **Manage Consumer Details**.
    
    A new window opens and a verification code is sent to your registered email address.
17. After you verify your identity, note the consumer key and consumer secret.
18. Select an execution user for the client credentials flow.
    
    Although there’s no user interaction in the client credentials flow, Salesforce still requires you to specify an execution user. By selecting an execution user, you allow Salesforce to return access tokens on behalf of this user.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)
    
    Note Permitted Users policies, such as **All users may self-authorize** and **Admin approved users are pre-authorized**, don’t apply to the execution user.
    
    1. From Setup, in the Quick Find box, enter Apps, and then select **Manage Connected Apps**.
    2. Click the connected app you just created.
    3. Click **Edit Policies**.
    4. Under Client Credentials Flow, for Run As, click ![Magnifying glass icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/resources-global/_corporate/images/lookup.png), and find the user who you want to assign the client credentials flow.
        
        For Enterprise Edition orgs, we recommend that you select an execution user who has the API Only User permission.
    5. Save your changes.

After you create the connected app, it can take up to 10 minutes for the connected app to be ready for use.

#### See Also

- [Configure a Connected App for the OAuth 2.0 Client Credentials Flow](https://help.salesforce.com/s/articleView?id=xcloud.connected_app_client_credentials_setup.htm&type=5&language=en_US)
- [Connected Apps](https://help.salesforce.com/s/articleView?id=xcloud.connected_app_overview.htm&type=5&language=en_US)