sendWhatsAppConversionEvent method
Sends a conversion event to Meta's Conversions API for the specified WhatsApp Business Account dataset.
May throw AccessDeniedByMetaException.
May throw DependencyException.
May throw InternalServiceException.
May throw InvalidParametersException.
May throw ResourceNotFoundException.
May throw ThrottledRequestException.
Parameter datasetId :
The Meta-generated dataset ID to send the event to.
Parameter eventData :
The raw Meta Conversions API event payload as a JSON blob. See Meta's
server event parameters for the supported format.
Parameter id :
The ID of the WhatsApp Business Account associated with the dataset,
formatted as waba-01234567890123456789012345678901.
Implementation
Future<SendWhatsAppConversionEventOutput> sendWhatsAppConversionEvent({
required String datasetId,
required Uint8List eventData,
required String id,
}) async {
final $payload = <String, dynamic>{
'datasetId': datasetId,
'eventData': base64Encode(eventData),
'id': id,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/whatsapp/waba/dataset/events',
exceptionFnMap: _exceptionFns,
);
return SendWhatsAppConversionEventOutput.fromJson(response);
}