---
schema_version: "1"
id: 3609aee697e0682f25ad2d3bd8d9c293a79126cc09ff9bc2fb99d5ee59b0c9c9
title: Invoke the Conversation History API
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/messaging-api/guides/invoke-conversation-history-api.md
canonical_url: https://developer.salesforce.com/docs/service/messaging-api/guide/invoke-conversation-history-api.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: c3edccb45068f2a7d1e95c8f227ec663e5ea4d12ea91e97c1857868e8465e9a2
products:
  - Enhanced Chat API
  - Service Cloud Developer Content
---
# Invoke the Conversation History API

Before you begin, you must [Configure an Enhanced Web Chat Deployment](https://help.salesforce.com/s/articleView?id=service.miaw_configure_web_deployment_1.htm).

1. Add the developer name of the connected app you created in [Create a Connected App](https://developer.salesforce.com/docs/service/messaging-api/guide/create-connected-app.md) to the [MessagingChannel Metadata Configuration](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_messagingchannel.htm).

   ```
<embeddedConfig>
        <authMode>Auth</authMode>
        <isAttachmentUploadEnabled>true</isAttachmentUploadEnabled>
        <isSaveTranscriptEnabled>false</isSaveTranscriptEnabled>
        <isEstimatedWaitTimeEnabled>false</isEstimatedWaitTimeEnabled>
        <verifiedUserJwtExpirationTime>360</verifiedUserJwtExpirationTime>
        **<connectedApp>ConnectedApp_Developer_name</connectedApp>**
        <messagingAuthorizations>
            <authorizationType>PublicKeyCertificateSet</authorizationType>
            <authProviderName></authProviderName>
            <publicKeyCertificateSetName>pcks1</publicKeyCertificateSetName>
            <enabled>false</enabled>
            <authIdentifier>auth_identifier_one</authIdentifier>
        </messagingAuthorizations>
    </embeddedConfig>
```

2. Use the connected app you created in [Create a Connected App](https://developer.salesforce.com/docs/service/messaging-api/guide/create-connected-app.md) to invoke the [Conversation History API](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-conversationHistory.html).
   1. In the `AuthorizationContext` API header, provide the `developerName` of the ConnectedApp configured above and set the `AuthorizationContextType` header value to `EmbeddedMessagingChannel`.
   2. In the `conversationParticipants.participant` parameter, when the `role` is `EndUser`, set the `appType` to `iamessage`.

**See Also**

- _Interaction Service API_: [Send Historical Conversation Entries](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-conversationHistory.html)
- _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis)
