共用方式為


Connect your healthcare agent service to WhatsApp (via Twilio) - Preview

Your bot can work over WhatsApp by using the WhatsApp Business API with Twilio. Twilio is a messaging service that provides an API for sending and receiving WhatsApp and SMS messages. The following tutorial shows how to connect a bot to the WhatsApp channel via Twilio, step by step.

  1. Sign-in to the healthcare agent service Management Portal

  2. In the left menu blade, select Channels under Integration.

  3. Select the activate toggle of the WhatsApp (via Twilio - preview) channel.

    Screenshot of WhatsApp channel selection

  4. Provide your Twilio credentials in the channel setting. Paste the Phone number, Account SID and Auth Token values copied from Your Twilio account settings.

Note

WhatsApp has to first approve your account before you can send and receive messages via WhatsApp. However, Twilio provides a Sandbox account for WhatsApp to allow you to build and test your app in a developer environment. To connect the Sandbox account, enter the Sandbox phone number to your channel configuration, using your own Account SID and Auth Token as above.

  1. Save the channel configuration and copy the Service URL Endpoint.
  2. Follow the detailed instructions to connect your bot to Twilio. The instructions guide you through creating a TwiML app. Use the Service URL Endpoint from the previous step as the TwiML Messaging REQUEST URL.
  3. Once everything is configured, test the connection by sending a WhatsApp message to your Twilio phone number. For example, send a WhatsApp message with the text "about" to trigger a built-in scenario that returns information about your bot version.

When you have completed these steps, your bot is successfully configured to communicate with users using WhatsApp via Twilio.

Next steps

Healthcare agent service Channels