Replies: 3 comments 5 replies
-
Hi, for registering the webhook subscription. Make sure you return the hubChallenge result response which will successfully validate your webhook. private string VerifyToken = "<YOUR VERIFY TOKEN STRING>";
[HttpGet("webhooks")]
public ActionResult<string> ConfigureWhatsAppMessageWebhook([FromQuery(Name = "hub.mode")] string hubMode,
[FromQuery(Name = "hub.challenge")] int hubChallenge,
[FromQuery(Name = "hub.verify_token")] string hubVerifyToken)
{
_logger.LogInformation("Results Returned from WhatsApp Server\n");
_logger.LogInformation($"hub_mode={hubMode}\n");
_logger.LogInformation($"hub_challenge={hubChallenge}\n");
_logger.LogInformation($"hub_verify_token={hubVerifyToken}\n");
if (!hubVerifyToken.Equals(VerifyToken))
{
return Forbid("VerifyToken doesn't match");
}
return Ok(hubChallenge);
} |
Beta Was this translation helpful? Give feedback.
-
Hey guys, I'm hitting the same issue. I'm struggling to understand why I get this same issue: In my case, I have a deployed app service and I just simply opened the two endpoints /webhooks POST and GET. With glitch I don't have this problem. Any idea what can be wrong? |
Beta Was this translation helpful? Give feedback.
-
Hi @gabrieldwight , first of all, thanks for your great job! I can receive and save the json in the bank. But when retrieving it, I use the same method to reply. Below is the snippet in use Try...catch to show a error and save it: It´s about error in line 344, saying that not exists definition for 'SingleOrDefault'. How can I deal with this error? |
Beta Was this translation helpful? Give feedback.
-
Hi, first thanks for your great job. I'm having a problem with registering the webhook. The verify token is correct, I'm trying with https://a096-186-137-155-57.sa.ngrok.io/api/WhatsAppNotification/webhooks, even changed to [HttpGet("webhooks")] instead of [HttpGet("receive/TextMessage")] in ConfigureWhatsAppMessageWebhook, but can't get facebook platform to validate it. Can you please tell me what i'm doing wrong? Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions