I am writing a webhook in C# to receive messages, change state and so on from whatsapp business platform.
My webhook receives data correctly from meta, but I cannot understand how to convalidate URL.
This is my very simple code
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string hubMode = Request["hub.mode"];
string hubChallenge = Request["hub.challenge"];
string hubVerify_token = Request["hub.verify_token"];
if (hubVerify_token == "pippoplutopaperino")
{
Response.Write(hubChallenge);
}
}
}
in the response write I receive this error:
Why, after hubChallenge, there are \r\n\r\n\u etc??????
Where am I doing wrong?
I expect to response witjh only hubChallenge