Package com.bytedesk.social.whatsapp
Class WhatsAppWebhooks
java.lang.Object
com.bytedesk.social.whatsapp.WhatsAppWebhooks
ngrok http 9003,生成url
https://051e47dbc9f3.ngrok-free.app/whatsapp/webhooks/1690459642527872
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final WhatsAppRestService
private final YCloudMessageService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<?>
receiveWebhook
(String uid, String rawPayload) 处理webhook的POST请求 接收并处理来自WhatsApp的webhook事件通知org.springframework.http.ResponseEntity<?>
verifyWebhook
(String uid, String mode, String verify_token, String challenge) WhatsApp webhook验证 用于接收和验证来自WhatsApp的webhook订阅验证请求
-
Field Details
-
whatsAppRestService
-
ycloudMessageService
-
-
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事件通知
-