listWhatsAppFlowAssets method

Future<ListWhatsAppFlowAssetsOutput> listWhatsAppFlowAssets({
  1. required String flowId,
  2. required String id,
  3. int? maxResults,
  4. String? nextToken,
})

Lists the assets (Flow JSON definition) of a WhatsApp Flow with presigned download URLs. Download URLs are generated by Meta and expire after a short period.

May throw AccessDeniedByMetaException. May throw DependencyException. May throw InternalServiceException. May throw InvalidParametersException. May throw ResourceNotFoundException. May throw ThrottledRequestException.

Parameter flowId : The unique identifier of the Flow whose assets to list.

Parameter id : The ID of the WhatsApp Business Account associated with this Flow.

Parameter maxResults : The maximum number of results to return per page.

Parameter nextToken : The token for the next page of results.

Implementation

Future<ListWhatsAppFlowAssetsOutput> listWhatsAppFlowAssets({
  required String flowId,
  required String id,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    'flowId': [flowId],
    'id': [id],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/v1/whatsapp/flow/assets',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListWhatsAppFlowAssetsOutput.fromJson(response);
}