publishWhatsAppFlow method
Publishes a WhatsApp Flow, making it available for use in template messages. The Flow must be in DRAFT status with valid Flow JSON that passes Meta's validation. This is an irreversible operation.
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 to publish.
Parameter id :
The ID of the WhatsApp Business Account associated with this Flow.
Implementation
Future<void> publishWhatsAppFlow({
required String flowId,
required String id,
}) async {
final $payload = <String, dynamic>{
'flowId': flowId,
'id': id,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/whatsapp/flow/publish',
exceptionFnMap: _exceptionFns,
);
}