disconnectParticipant method
Disconnects a participant.
For security recommendations, see Connect Customer Chat security best practices. The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter connectionToken :
The authentication token associated with the participant's connection.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request. If not provided, the Amazon Web Services SDK
populates this field. For more information about idempotency, see Making
retries safe with idempotent APIs.
Implementation
Future<void> disconnectParticipant({
required String connectionToken,
String? clientToken,
}) async {
final headers = <String, String>{
'X-Amz-Bearer': connectionToken.toString(),
};
final $payload = <String, dynamic>{
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/participant/disconnect',
headers: headers,
exceptionFnMap: _exceptionFns,
);
}