Get Started with Conversation Service API

Comply with GDPR guidelines by using the Delete API to delete customer information. This includes Messaging End User, Messaging Session, Conversation, Conversation Entry, Conversation Participant, Participant Device, Intelligence Signals, Intelligence Signal Targets, Related Records, Participant, Context Param Maps, and VoiceCall. This API isn't available on Government Cloud orgs.

Currently, when you delete a Messaging End User and the same user tries to message you again, they may have trouble initiating a new conversation. This issue only affects mobile Messaging for In-App implementations and a fix is in progress.

  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. Set Run As to an integration user or admin with API access.
    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 Service API by setting the Authorization header to Bearer YOUR_ACCESS_TOKEN.

See Also

External Client Apps