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.
- From Setup, in the Quick Find box, enter Conversation Service API, and click Conversation Service API.
- Click the toggle to On.
- Configure an External Client App and Enable OAuth Settings for API Integration.
- From Setup, enter
Appin the Quick Find box, and select External Client App Manager. - Click New External Client App.
- Enter the external client app name, API name, and contact email fields.
- For distribution state, select Local.
- In the OAuth Settings area of the page, select Enable OAuth.
- For callback URL, enter any valid URL. For example:
https://login.salesforce.com/services/oauth2/success. - For OAuth scopes, select Access the Salesforce API Platform (sfap_api).
- Enable Enable Client Credentials Flow.
- Disable Require Proof Key for Code Exchange (PKCE) Extension for Supported Authorization Flows.
- Disable Require Secret for Web Server.
- Disable Require Secret for Refresh Token.
- Enable Issue JSON Web Token (JWT)-based access tokens for named users.
- Save the new external client app.
- From Setup, enter
- Configure External Client App OAuth Policies.
- Navigate to the Policies tab of your newly created external client app, expand the OAuth Policies dropdown, and click Edit.
- Enable Enable Client Credentials Flow.
- 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.
- Under Named User JWT-Based Access Token Settings, select a token timeout time that meets your needs.
- (Optional) Under App Authorization, relax IP restrictions if your integration is calling from outside trusted Salesforce IP ranges.
- Save your changes.
- Retrieve Your Credentials.
- Navigate to the Settings tab of your external client app, expand the OAuth Settings dropdown and click Consumer Key and Secret.
- Copy your Consumer Key (client ID) and Consumer Secret.
- 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