I'll create a website for a WhatsApp bot that can be easily deployed. This will include a landing page explaining the bot and the necessary backend code to handle WhatsApp API interactions.
Now that you have the code for your WhatsApp Bot website, here's how to deploy it:
Before deploying, you'll need to set up these environment variables:
WHATSAPP_TOKEN: Your WhatsApp API token from Meta Developer PortalWHATSAPP_PHONE_NUMBER_ID: Your WhatsApp phone number IDWEBHOOK_VERIFY_TOKEN: A custom token you create to verify webhook requestsThe easiest way to deploy this website is using Vercel:
After deployment:
https://your-domain.com/api/whatsapp/webhook)WEBHOOK_VERIFY_TOKEN for verificationOnce everything is set up, you can test your WhatsApp Bot by sending a message to your WhatsApp Business number. The bot should respond based on the logic in the webhook handler.
Please make sure to add the following environment variables to your project: