制作WhatsApp Chatbot并使用WhatsApp API在c#中发送WhatsApp消息.
Demo WhatsApp API ChatBot using Ultramsg API with c#.
by Ultramsg.com
for local development purposes, a tunneling service is required. This example uses ngrok , You can download ngrok from here.
Set the instance ID and token in appsettings.json file.
dotnet watchRun ngrok For Windows :
ngrok http https://localhost:6000Run ngrok For mac :
./ngrok http https://localhost:6000Go 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" .
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.
Use Issues to contact me
暂无开放 Issues,或尚未同步最近议题。