https://github.com/ultramsg/whatsapp-webhook-csharp
simple project to handle incoming WhatsApp API message using c#.
https://github.com/ultramsg/whatsapp-webhook-csharp
csharp wa-bot webhook whatsapp-api whatsapp-api-csharp whatsapp-chat whatsapp-csharp
Last synced: 1 day ago
JSON representation
simple project to handle incoming WhatsApp API message using c#.
- Host: GitHub
- URL: https://github.com/ultramsg/whatsapp-webhook-csharp
- Owner: ultramsg
- License: mit
- Created: 2022-06-23T02:33:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-23T03:15:35.000Z (over 3 years ago)
- Last Synced: 2025-04-12T07:43:24.952Z (6 months ago)
- Topics: csharp, wa-bot, webhook, whatsapp-api, whatsapp-api-csharp, whatsapp-chat, whatsapp-csharp
- Language: C#
- Homepage: https://ultramsg.com
- Size: 9.77 KB
- Stars: 22
- Watchers: 1
- Forks: 18
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [Ultramsg.com](https://ultramsg.com/?utm_source=github&utm_medium=csharp&utm_campaign=webhook) whatsapp-webhook-csharp
simple project to handle incoming WhatsApp message using c#.
by [Ultramsg.com](https://ultramsg.com/?utm_source=github&utm_medium=csharp&utm_campaign=webhook)
# Dependencies
for local development purposes, a tunneling service is required. This example uses ngrok , You can download ngrok from [here](https://ngrok.com/download).
# run project
```
dotnet watch
```
# Start ngrok
```
ngrok http https://localhost:6000
```# set Webhook URL
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" .
# receive WhatsApp messagesnow You should be able to receive WhatsApp webhooks .
# Example json response
```
{
"event_type": "message_received",
"instanceId": "1150",
"id": "",
"referenceId": "",
"data": {
"id": "false_10172127174@c.us_3EB02E5EB89CE03FB034",
"from": "10172127174@c.us",
"to": "10172127170@c.us",
"author": "",
"pushname": "E.St",
"ack": "",
"type": "chat",
"body": "Hi",
"media": "",
"fromMe": false,
"isForwarded": false,
"isMentioned": false,
"quotedMsg": {},
"mentionedIds": [],
"time": 1650002663
}
}
```# Support
Use **Issues** to contact me