# 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](/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).

   ```sfdocs-code {"lang":"java", "title": "", "src": "" }
   <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](/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.md).
   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.md)
- *GitHub*: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis)
