describeView method

Future<DescribeViewResponse> describeView({
  1. required String connectionToken,
  2. required String viewToken,
})

Retrieves the view for the specified view token.

For security recommendations, see Connect Customer Chat security best practices.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter connectionToken : The connection token.

Parameter viewToken : An encrypted token originating from the interactive message of a ShowView block operation. Represents the desired view.

Implementation

Future<DescribeViewResponse> describeView({
  required String connectionToken,
  required String viewToken,
}) async {
  final headers = <String, String>{
    'X-Amz-Bearer': connectionToken.toString(),
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/participant/views/${Uri.encodeComponent(viewToken)}',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return DescribeViewResponse.fromJson(response);
}