getIntegrationsWhatsappWebhook method

Future<void> getIntegrationsWhatsappWebhook()

WhatsApp Cloud API subscription challenge

Meta calls this once when the webhook is subscribed, carrying the verify token this deployment was configured with and a challenge to echo. The token is compared in constant time before the echo — answering the challenge without checking it would let anyone point their own app at this address and have it confirm the subscription.

Implementation

Future<void> getIntegrationsWhatsappWebhook() async {
  final response = await getIntegrationsWhatsappWebhookWithHttpInfo();
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
}