GetTranscript
Retrieves a transcript of the session, including details about any attachments. For information about accessing past chat contact transcripts for a persistent chat, see Enable persistent chat.
For security recommendations, see Amazon Connect Chat security best practices.
If you have a process that consumes events in the transcript of an chat that has ended, note that chat transcripts contain the following event content types if the event has occurred during the chat session:
-
application/vnd.amazonaws.connect.event.participant.left
-
application/vnd.amazonaws.connect.event.participant.joined
-
application/vnd.amazonaws.connect.event.chat.ended
-
application/vnd.amazonaws.connect.event.transfer.succeeded
-
application/vnd.amazonaws.connect.event.transfer.failed
Note
ConnectionToken
is used for invoking this API instead of
ParticipantToken
.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
Request Syntax
POST /participant/transcript HTTP/1.1
X-Amz-Bearer: ConnectionToken
Content-type: application/json
{
"ContactId": "string
",
"MaxResults": number
,
"NextToken": "string
",
"ScanDirection": "string
",
"SortOrder": "string
",
"StartPosition": {
"AbsoluteTime": "string
",
"Id": "string
",
"MostRecent": number
}
}
URI Request Parameters
The request uses the following URI parameters.
- ConnectionToken
-
The authentication token associated with the participant's connection.
Length Constraints: Minimum length of 1. Maximum length of 1000.
Required: Yes
Request Body
The request accepts the following data in JSON format.
- ContactId
-
The contactId from the current contact chain for which transcript is needed.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Required: No
- MaxResults
-
The maximum number of results to return in the page. Default: 10.
Type: Integer
Valid Range: Minimum value of 0. Maximum value of 100.
Required: No
- NextToken
-
The pagination token. Use the value returned previously in the next subsequent request to retrieve the next set of results.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1000.
Required: No
- ScanDirection
-
The direction from StartPosition from which to retrieve message. Default: BACKWARD when no StartPosition is provided, FORWARD with StartPosition.
Type: String
Valid Values:
FORWARD | BACKWARD
Required: No
- SortOrder
-
The sort order for the records. Default: DESCENDING.
Type: String
Valid Values:
DESCENDING | ASCENDING
Required: No
- StartPosition
-
A filtering option for where to start.
Type: StartPosition object
Required: No
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"InitialContactId": "string",
"NextToken": "string",
"Transcript": [
{
"AbsoluteTime": "string",
"Attachments": [
{
"AttachmentId": "string",
"AttachmentName": "string",
"ContentType": "string",
"Status": "string"
}
],
"ContactId": "string",
"Content": "string",
"ContentType": "string",
"DisplayName": "string",
"Id": "string",
"MessageMetadata": {
"MessageId": "string",
"Receipts": [
{
"DeliveredTimestamp": "string",
"ReadTimestamp": "string",
"RecipientParticipantId": "string"
}
]
},
"ParticipantId": "string",
"ParticipantRole": "string",
"RelatedContactId": "string",
"Type": "string"
}
]
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- InitialContactId
-
The initial contact ID for the contact.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
- NextToken
-
The pagination token. Use the value returned previously in the next subsequent request to retrieve the next set of results.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1000.
- Transcript
-
The list of messages in the session.
Type: Array of Item objects
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
You do not have sufficient access to perform this action.
HTTP Status Code: 403
- InternalServerException
-
This exception occurs when there is an internal failure in the Amazon Connect service.
HTTP Status Code: 500
- ThrottlingException
-
The request was denied due to request throttling.
HTTP Status Code: 429
- ValidationException
-
The input fails to satisfy the constraints specified by Amazon Connect.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: