Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ultramsg/csharp-whatsapp-chatbot
Make WhatsApp Chatbot and use WhatsApp API to send the WhatsApp messages in c# .
https://github.com/ultramsg/csharp-whatsapp-chatbot
chat-bot chatbot csharp csharp-chatbot whatsapp-api whatsapp-api-csharp whatsapp-bot whatsapp-chat
Last synced: about 1 month ago
JSON representation
Make WhatsApp Chatbot and use WhatsApp API to send the WhatsApp messages in c# .
- Host: GitHub
- URL: https://github.com/ultramsg/csharp-whatsapp-chatbot
- Owner: ultramsg
- Created: 2022-09-16T21:38:40.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-11T11:55:45.000Z (over 1 year ago)
- Last Synced: 2024-10-01T07:41:10.609Z (about 1 month ago)
- Topics: chat-bot, chatbot, csharp, csharp-chatbot, whatsapp-api, whatsapp-api-csharp, whatsapp-bot, whatsapp-chat
- Language: C#
- Homepage: https://ultramsg.com
- Size: 87.9 KB
- Stars: 85
- Watchers: 5
- Forks: 54
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [Ultramsg.com](https://ultramsg.com/?utm_source=github&utm_medium=csharp&utm_campaign=chatbot) csharp-whatsapp-chatbot
Demo WhatsApp API ChatBot using Ultramsg API with c#.
by [Ultramsg.com](https://ultramsg.com/?utm_source=github&utm_medium=csharp&utm_campaign=chatbot)
# Dependencies
for local development purposes, a tunneling service is required. This example uses ngrok , You can download ngrok from [here](https://ngrok.com/download).
# Set the instance ID and token
Set the instance ID and token in appsettings.json file.# run project
```
dotnet watch
```
# Start ngrok
Run ngrok For Windows :```
ngrok http https://localhost:6000
```
Run ngrok For mac :
```
./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" .![Alt text](https://blog.ultramsg.com/wp-content/uploads/2022/09/ultramsg-whatsapp-api-webhook.png "Webhook")
# receive WhatsApp messages and command processing
Congratulations.. Now you can try sending to WhatsApp number and testing the chatbot.This is all you need to receive and read messages from users, and then respond to them.
You can develop the list and add more complex commands such as querying from Database and updating records in the database ..etc.# Support
Use **Issues** to contact me