Class WhatsAppService
java.lang.Object
com.bytedesk.social.whatsapp.config.WhatsAppService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.fasterxml.jackson.databind.ObjectMapper
private final org.springframework.web.client.RestTemplate
private final WhatsAppConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
processMessageChange
(com.fasterxml.jackson.databind.JsonNode value) void
Process incoming webhook event from WhatsAppvoid
processWebhookEvent
(String rawBody) Process incoming webhook event from WhatsApp (raw JSON string)void
sendTextMessage
(String to, String text) Send text message to WhatsApp userboolean
设置WhatsApp Business Profileboolean
verifyWebhook
(String mode, String verifyToken, String challenge) Verify webhook token
-
Field Details
-
whatsAppConfig
-
restTemplate
private final org.springframework.web.client.RestTemplate restTemplate -
objectMapper
private final com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Details
-
WhatsAppService
public WhatsAppService()
-
-
Method Details
-
sendTextMessage
Send text message to WhatsApp user -
processWebhookEvent
Process incoming webhook event from WhatsApp -
verifyWebhook
Verify webhook token -
processWebhookEvent
Process incoming webhook event from WhatsApp (raw JSON string) -
processMessageChange
private void processMessageChange(com.fasterxml.jackson.databind.JsonNode value) -
setBusinessProfile
public boolean setBusinessProfile()设置WhatsApp Business Profile
-