putWhatsAppBusinessAccountEventDestinations method
Add an event destination to log event data from WhatsApp for a WhatsApp Business Account (WABA). A WABA can only have one event destination at a time. All resources associated with the WABA use the same event destination.
May throw InternalServiceException.
May throw InvalidParametersException.
May throw ThrottledRequestException.
Parameter eventDestinations :
An array of WhatsAppBusinessAccountEventDestination event
destinations.
Parameter id :
The unique identifier of your WhatsApp Business Account. WABA identifiers
are formatted as waba-01234567890123456789012345678901. Use
ListLinkedWhatsAppBusinessAccounts
to list all WABAs and their details.
Implementation
Future<void> putWhatsAppBusinessAccountEventDestinations({
required List<WhatsAppBusinessAccountEventDestination> eventDestinations,
required String id,
}) async {
final $payload = <String, dynamic>{
'eventDestinations': eventDestinations,
'id': id,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/v1/whatsapp/waba/eventdestinations',
exceptionFnMap: _exceptionFns,
);
}