Ultramsg.com whatsapp-webhook-csharp
simple project to handle incoming WhatsApp message using c#.
by Ultramsg.com
for local development purposes, a tunneling service is required. This example uses ngrok , You can download ngrok from here.
dotnet watch
ngrok http https://localhost:6000
Go to your ultramsg account for set Webhook URL after copying the ngrok url and add /api/ Route like this :
https://61-44-136-9.ngrok.io/api/
and enable this option "Webhook on Received" .
now You should be able to receive WhatsApp webhooks .
{
"event_type": "message_received",
"instanceId": "1150",
"id": "",
"referenceId": "",
"data": {
"id": "[email protected]_3EB02E5EB89CE03FB034",
"from": "[email protected]",
"to": "[email protected]",
"author": "",
"pushname": "E.St",
"ack": "",
"type": "chat",
"body": "Hi",
"media": "",
"fromMe": false,
"isForwarded": false,
"isMentioned": false,
"quotedMsg": {},
"mentionedIds": [],
"time": 1650002663
}
}
Use Issues to contact me