Get Started with Conversation Data API

Use the Conversation Data API to manage enhanced messaging conversations, such as retrieving conversation entry data and deleting messaging end user information.

  1. From Setup, in the Quick Find box, enter Conversation Service API, and click Conversation Service API.
  2. Click the toggle to On.
  1. Configure an External Client App and Enable OAuth Settings for API Integration.
    1. From Setup, enter App in the Quick Find box, and select External Client App Manager.
    2. Click New External Client App.
    3. Enter the external client app name, API name, and contact email fields.
    4. For distribution state, select Local.
    5. In the OAuth Settings area of the page, select Enable OAuth.
    6. For callback URL, enter any valid URL. For example: https://login.salesforce.com/services/oauth2/success.
    7. For OAuth scopes, select Access the Salesforce API Platform (sfap_api).
    8. Enable Enable Client Credentials Flow.
    9. Disable Require Proof Key for Code Exchange (PKCE) Extension for Supported Authorization Flows.
    10. Disable Require Secret for Web Server.
    11. Disable Require Secret for Refresh Token.
    12. Enable Issue JSON Web Token (JWT)-based access tokens for named users.
    13. Save the new external client app.
  2. Configure External Client App OAuth Policies.
    1. Navigate to the Policies tab of your newly created external client app, expand the OAuth Policies dropdown, and click Edit.
    2. Enable Enable Client Credentials Flow.
    3. To allow Salesforce to return access tokens, you must select an execution user for the flow. This user must have the API Only User permission. We recommend creating a user specifically for this integration. Set Run As to select the user that you want to assign the client credentials flow.
    4. Under Named User JWT-Based Access Token Settings, select a token timeout time that meets your needs.
    5. (Optional) Under App Authorization, relax IP restrictions if your integration is calling from outside trusted Salesforce IP ranges.
    6. Save your changes.
  3. Retrieve Your Credentials.
    1. Navigate to the Settings tab of your external client app, expand the OAuth Settings dropdown and click Consumer Key and Secret.
    2. Copy your Consumer Key (client ID) and Consumer Secret.
  4. Use the Consumer Key and Consumer Secret to follow the steps outlined in OAuth 2.0 Client Credentials Flow for Server-to-Server Integration to obtain an access token.

Use the access token you generated to call the Conversation Data API by setting the Authorization header to Bearer YOUR_ACCESS_TOKEN.

See Also

External Client Apps