Amazon Connect Participant Service 2018-09-07
- Client: Aws\ConnectParticipant\ConnectParticipantClient
- Service ID: connectparticipant
- Version: 2018-09-07
This page describes the parameters and results for the operations of the Amazon Connect Participant Service (2018-09-07), and shows how to use the Aws\ConnectParticipant\ConnectParticipantClient object to call the described operations. This documentation is specific to the 2018-09-07 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName')
, where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */)
.
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */)
.
- CompleteAttachmentUpload ( array $params = [] )
Allows you to confirm that the attachment has been uploaded using the pre-signed URL provided in StartAttachmentUpload API.
- CreateParticipantConnection ( array $params = [] )
Creates the participant's connection.
- DisconnectParticipant ( array $params = [] )
Disconnects a participant.
- GetAttachment ( array $params = [] )
Provides a pre-signed URL for download of a completed attachment.
- GetTranscript ( array $params = [] )
Retrieves a transcript of the session, including details about any attachments.
- SendEvent ( array $params = [] )
Sends an event.
- SendMessage ( array $params = [] )
Sends a message.
- StartAttachmentUpload ( array $params = [] )
Provides a pre-signed Amazon S3 URL in response for uploading the file directly to S3.
Paginators
Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:
Operations
CompleteAttachmentUpload
$result = $client->completeAttachmentUpload
([/* ... */]); $promise = $client->completeAttachmentUploadAsync
([/* ... */]);
Allows you to confirm that the attachment has been uploaded using the pre-signed URL provided in StartAttachmentUpload API.
Parameter Syntax
$result = $client->completeAttachmentUpload([ 'AttachmentIds' => ['<string>', ...], // REQUIRED 'ClientToken' => '<string>', // REQUIRED 'ConnectionToken' => '<string>', // REQUIRED ]);
Parameter Details
Members
- AttachmentIds
-
- Required: Yes
- Type: Array of strings
A list of unique identifiers for the attachments.
- ClientToken
-
- Required: Yes
- Type: string
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
- ConnectionToken
-
- Required: Yes
- Type: string
The authentication token associated with the participant's connection.
Result Syntax
[]
Result Details
Errors
-
You do not have sufficient access to perform this action.
-
This exception occurs when there is an internal failure in the Amazon Connect service.
-
The request was denied due to request throttling.
-
The input fails to satisfy the constraints specified by Amazon Connect.
-
ServiceQuotaExceededException:
The number of attachments per contact exceeds the quota.
-
An attachment with that identifier is already being uploaded.
CreateParticipantConnection
$result = $client->createParticipantConnection
([/* ... */]); $promise = $client->createParticipantConnectionAsync
([/* ... */]);
Creates the participant's connection. Note that ParticipantToken is used for invoking this API instead of ConnectionToken.
The participant token is valid for the lifetime of the participant – until they are part of a contact.
The response URL for WEBSOCKET
Type has a connect expiry timeout of 100s. Clients must manually connect to the returned websocket URL and subscribe to the desired topic.
For chat, you need to publish the following on the established websocket connection:
{"topic":"aws/subscribe","content":{"topics":["aws/chat"]}}
Upon websocket URL expiry, as specified in the response ConnectionExpiry parameter, clients need to call this API again to obtain a new websocket URL and perform the same steps as before.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
Parameter Syntax
$result = $client->createParticipantConnection([ 'ParticipantToken' => '<string>', // REQUIRED 'Type' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- ParticipantToken
-
- Required: Yes
- Type: string
This is a header parameter.
The Participant Token as obtained from StartChatContact API response.
- Type
-
- Required: Yes
- Type: Array of strings
Type of connection information required.
Result Syntax
[ 'ConnectionCredentials' => [ 'ConnectionToken' => '<string>', 'Expiry' => '<string>', ], 'Websocket' => [ 'ConnectionExpiry' => '<string>', 'Url' => '<string>', ], ]
Result Details
Members
- ConnectionCredentials
-
- Type: ConnectionCredentials structure
Creates the participant's connection credentials. The authentication token associated with the participant's connection.
- Websocket
-
- Type: Websocket structure
Creates the participant's websocket connection.
Errors
-
You do not have sufficient access to perform this action.
-
This exception occurs when there is an internal failure in the Amazon Connect service.
-
The request was denied due to request throttling.
-
The input fails to satisfy the constraints specified by Amazon Connect.
DisconnectParticipant
$result = $client->disconnectParticipant
([/* ... */]); $promise = $client->disconnectParticipantAsync
([/* ... */]);
Disconnects a participant. Note that ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
Parameter Syntax
$result = $client->disconnectParticipant([ 'ClientToken' => '<string>', 'ConnectionToken' => '<string>', // REQUIRED ]);
Parameter Details
Members
Result Syntax
[]
Result Details
Errors
-
You do not have sufficient access to perform this action.
-
This exception occurs when there is an internal failure in the Amazon Connect service.
-
The request was denied due to request throttling.
-
The input fails to satisfy the constraints specified by Amazon Connect.
GetAttachment
$result = $client->getAttachment
([/* ... */]); $promise = $client->getAttachmentAsync
([/* ... */]);
Provides a pre-signed URL for download of a completed attachment. This is an asynchronous API for use with active contacts.
Parameter Syntax
$result = $client->getAttachment([ 'AttachmentId' => '<string>', // REQUIRED 'ConnectionToken' => '<string>', // REQUIRED ]);
Parameter Details
Members
Result Syntax
[ 'Url' => '<string>', 'UrlExpiry' => '<string>', ]
Result Details
Members
Errors
-
You do not have sufficient access to perform this action.
-
This exception occurs when there is an internal failure in the Amazon Connect service.
-
The request was denied due to request throttling.
-
The input fails to satisfy the constraints specified by Amazon Connect.
GetTranscript
$result = $client->getTranscript
([/* ... */]); $promise = $client->getTranscriptAsync
([/* ... */]);
Retrieves a transcript of the session, including details about any attachments. Note that ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
Parameter Syntax
$result = $client->getTranscript([ 'ConnectionToken' => '<string>', // REQUIRED 'ContactId' => '<string>', 'MaxResults' => <integer>, 'NextToken' => '<string>', 'ScanDirection' => 'FORWARD|BACKWARD', 'SortOrder' => 'DESCENDING|ASCENDING', 'StartPosition' => [ 'AbsoluteTime' => '<string>', 'Id' => '<string>', 'MostRecent' => <integer>, ], ]);
Parameter Details
Members
- ConnectionToken
-
- Required: Yes
- Type: string
The authentication token associated with the participant's connection.
- ContactId
-
- Type: string
The contactId from the current contact chain for which transcript is needed.
- MaxResults
-
- Type: int
The maximum number of results to return in the page. Default: 10.
- NextToken
-
- Type: string
The pagination token. Use the value returned previously in the next subsequent request to retrieve the next set of results.
- ScanDirection
-
- Type: string
The direction from StartPosition from which to retrieve message. Default: BACKWARD when no StartPosition is provided, FORWARD with StartPosition.
- SortOrder
-
- Type: string
The sort order for the records. Default: DESCENDING.
- StartPosition
-
- Type: StartPosition structure
A filtering option for where to start.
Result Syntax
[ 'InitialContactId' => '<string>', 'NextToken' => '<string>', 'Transcript' => [ [ 'AbsoluteTime' => '<string>', 'Attachments' => [ [ 'AttachmentId' => '<string>', 'AttachmentName' => '<string>', 'ContentType' => '<string>', 'Status' => 'APPROVED|REJECTED|IN_PROGRESS', ], // ... ], 'Content' => '<string>', 'ContentType' => '<string>', 'DisplayName' => '<string>', 'Id' => '<string>', 'ParticipantId' => '<string>', 'ParticipantRole' => 'AGENT|CUSTOMER|SYSTEM', 'Type' => 'TYPING|PARTICIPANT_JOINED|PARTICIPANT_LEFT|CHAT_ENDED|TRANSFER_SUCCEEDED|TRANSFER_FAILED|MESSAGE|EVENT|ATTACHMENT|CONNECTION_ACK', ], // ... ], ]
Result Details
Members
- InitialContactId
-
- Type: string
The initial contact ID for the contact.
- NextToken
-
- Type: string
The pagination token. Use the value returned previously in the next subsequent request to retrieve the next set of results.
- Transcript
-
- Type: Array of Item structures
The list of messages in the session.
Errors
-
You do not have sufficient access to perform this action.
-
This exception occurs when there is an internal failure in the Amazon Connect service.
-
The request was denied due to request throttling.
-
The input fails to satisfy the constraints specified by Amazon Connect.
SendEvent
$result = $client->sendEvent
([/* ... */]); $promise = $client->sendEventAsync
([/* ... */]);
Sends an event. Note that ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
Parameter Syntax
$result = $client->sendEvent([ 'ClientToken' => '<string>', 'ConnectionToken' => '<string>', // REQUIRED 'Content' => '<string>', 'ContentType' => '<string>', // REQUIRED ]);
Parameter Details
Members
- ClientToken
-
- Type: string
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
- ConnectionToken
-
- Required: Yes
- Type: string
The authentication token associated with the participant's connection.
- Content
-
- Type: string
The content of the event to be sent (for example, message text). This is not yet supported.
- ContentType
-
- Required: Yes
- Type: string
The content type of the request. Supported types are:
-
application/vnd.amazonaws.connect.event.typing
-
application/vnd.amazonaws.connect.event.connection.acknowledged
Result Syntax
[ 'AbsoluteTime' => '<string>', 'Id' => '<string>', ]
Result Details
Members
Errors
-
You do not have sufficient access to perform this action.
-
This exception occurs when there is an internal failure in the Amazon Connect service.
-
The request was denied due to request throttling.
-
The input fails to satisfy the constraints specified by Amazon Connect.
SendMessage
$result = $client->sendMessage
([/* ... */]); $promise = $client->sendMessageAsync
([/* ... */]);
Sends a message. Note that ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
Parameter Syntax
$result = $client->sendMessage([ 'ClientToken' => '<string>', 'ConnectionToken' => '<string>', // REQUIRED 'Content' => '<string>', // REQUIRED 'ContentType' => '<string>', // REQUIRED ]);
Parameter Details
Members
- ClientToken
-
- Type: string
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
- ConnectionToken
-
- Required: Yes
- Type: string
The authentication token associated with the connection.
- Content
-
- Required: Yes
- Type: string
The content of the message.
- ContentType
-
- Required: Yes
- Type: string
The type of the content. Supported types are text/plain.
Result Syntax
[ 'AbsoluteTime' => '<string>', 'Id' => '<string>', ]
Result Details
Members
Errors
-
You do not have sufficient access to perform this action.
-
This exception occurs when there is an internal failure in the Amazon Connect service.
-
The request was denied due to request throttling.
-
The input fails to satisfy the constraints specified by Amazon Connect.
StartAttachmentUpload
$result = $client->startAttachmentUpload
([/* ... */]); $promise = $client->startAttachmentUploadAsync
([/* ... */]);
Provides a pre-signed Amazon S3 URL in response for uploading the file directly to S3.
Parameter Syntax
$result = $client->startAttachmentUpload([ 'AttachmentName' => '<string>', // REQUIRED 'AttachmentSizeInBytes' => <integer>, // REQUIRED 'ClientToken' => '<string>', // REQUIRED 'ConnectionToken' => '<string>', // REQUIRED 'ContentType' => '<string>', // REQUIRED ]);
Parameter Details
Members
- AttachmentName
-
- Required: Yes
- Type: string
A case-sensitive name of the attachment being uploaded.
- AttachmentSizeInBytes
-
- Required: Yes
- Type: long (int|float)
The size of the attachment in bytes.
- ClientToken
-
- Required: Yes
- Type: string
A unique case sensitive identifier to support idempotency of request.
- ConnectionToken
-
- Required: Yes
- Type: string
The authentication token associated with the participant's connection.
- ContentType
-
- Required: Yes
- Type: string
Describes the MIME file type of the attachment. For a list of supported file types, see Feature specifications in the Amazon Connect Administrator Guide.
Result Syntax
[ 'AttachmentId' => '<string>', 'UploadMetadata' => [ 'HeadersToInclude' => ['<string>', ...], 'Url' => '<string>', 'UrlExpiry' => '<string>', ], ]
Result Details
Members
- AttachmentId
-
- Type: string
A unique identifier for the attachment.
- UploadMetadata
-
- Type: UploadMetadata structure
Fields to be used while uploading the attachment.
Errors
-
You do not have sufficient access to perform this action.
-
This exception occurs when there is an internal failure in the Amazon Connect service.
-
The request was denied due to request throttling.
-
The input fails to satisfy the constraints specified by Amazon Connect.
-
ServiceQuotaExceededException:
The number of attachments per contact exceeds the quota.
Shapes
AccessDeniedException
Description
You do not have sufficient access to perform this action.
Members
AttachmentItem
Description
The case-insensitive input to indicate standard MIME type that describes the format of the file that will be uploaded.
Members
- AttachmentId
-
- Type: string
A unique identifier for the attachment.
- AttachmentName
-
- Type: string
A case-sensitive name of the attachment being uploaded.
- ContentType
-
- Type: string
Describes the MIME file type of the attachment. For a list of supported file types, see Feature specifications in the Amazon Connect Administrator Guide.
- Status
-
- Type: string
Status of the attachment.
ConflictException
Description
An attachment with that identifier is already being uploaded.
Members
ConnectionCredentials
Description
Connection credentials.
Members
InternalServerException
Description
This exception occurs when there is an internal failure in the Amazon Connect service.
Members
Item
Description
An item - message or event - that has been sent.
Members
- AbsoluteTime
-
- Type: string
The time when the message or event was sent.
It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.
- Attachments
-
- Type: Array of AttachmentItem structures
Provides information about the attachments.
- Content
-
- Type: string
The content of the message or event.
- ContentType
-
- Type: string
The type of content of the item.
- DisplayName
-
- Type: string
The chat display name of the sender.
- Id
-
- Type: string
The ID of the item.
- ParticipantId
-
- Type: string
The ID of the sender in the session.
- ParticipantRole
-
- Type: string
The role of the sender. For example, is it a customer, agent, or system.
- Type
-
- Type: string
Type of the item: message or event.
ServiceQuotaExceededException
Description
The number of attachments per contact exceeds the quota.
Members
StartPosition
Description
A filtering option for where to start. For example, if you sent 100 messages, start with message 50.
Members
- AbsoluteTime
-
- Type: string
The time in ISO format where to start.
It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.
- Id
-
- Type: string
The ID of the message or event where to start.
- MostRecent
-
- Type: int
The start position of the most recent message where you want to start.
ThrottlingException
Description
The request was denied due to request throttling.
Members
UploadMetadata
Description
Fields to be used while uploading the attachment.
Members
- HeadersToInclude
-
- Type: Associative array of custom strings keys (UploadMetadataSignedHeadersKey) to strings
The headers to be provided while uploading the file to the URL.
- Url
-
- Type: string
The pre-signed URL using which file would be downloaded from Amazon S3 by the API caller.
- UrlExpiry
-
- Type: string
The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.
ValidationException
Description
The input fails to satisfy the constraints specified by Amazon Connect.