Class WhatsAppWebhooks

java.lang.Object
com.bytedesk.social.whatsapp.WhatsAppWebhooks

@RestController @RequestMapping("/whatsapp/webhooks") public class WhatsAppWebhooks extends Object
ngrok http 9003,生成url https://051e47dbc9f3.ngrok-free.app/whatsapp/webhooks/1690459642527872
  • Field Details

  • Constructor Details

    • WhatsAppWebhooks

      public WhatsAppWebhooks()
  • Method Details

    • verifyWebhook

      @GetMapping("/{uid}") public org.springframework.http.ResponseEntity<?> verifyWebhook(@PathVariable String uid, @RequestParam(required=false) String mode, @RequestParam(required=false) String verify_token, @RequestParam(required=false) String challenge)
      WhatsApp webhook验证 用于接收和验证来自WhatsApp的webhook订阅验证请求
    • receiveWebhook

      @PostMapping("/{uid}") public org.springframework.http.ResponseEntity<?> receiveWebhook(@PathVariable String uid, @RequestBody String rawPayload)
      处理webhook的POST请求 接收并处理来自WhatsApp的webhook事件通知