Microsoft Bot Framework messaging
This guide covers the steps on how to connect the Microsoft Bot Framework with the Infobip platform using WhatsApp, SMS and Viber as a communication channels.
The Infobip adapter enables you to receive and send WhatsApp, SMS, and Viber messages. Through the Infobip adapter, you can add an additional endpoint to your chatbot to receive WhatsApp messages.
Available channels
The adapter currently supports the following scenarios listed below.
WhatsApp:
- Send/receive text messages
- Send/receive media messages (document, image, video, audio)
- Send/receive location messages
- Send message templates
- Verify incoming Infobip requests
- Receive delivery reports
SMS:
- Send/receive text messages
- Verify incoming Infobip requests
- Receive delivery reports
- Callback data – Add data in every message and that data will be returned to the chatbot in the message delivery report
- Full incoming request from Infobip is added to the incoming activity as ChannelData
Viber:
- Send/receive text messages
- Send rich messages (text, image and button)
- Verification of incoming Infobip requests
- Receive delivery reports
- Callback data - You can add some data in every message and that data will be returned to bot in delivery report for that message
- Full incoming request from Infobip is added to the incoming activity as ChannelData
What you will need
Before you start, you will need:
- Infobip account. If you do not have an account, you can create one (opens in a new tab).
- SMS, WhatsApp or Viber sender.
Once you have your Infobip account and have verified your phone number, you're automatically assigned testing SMS, WhatsApp, and Viber senders. Go to Channels and Numbers (opens in a new tab) to view your test senders.
When you've finished testing and you want to have dedicated senders, request one directly from Infobip web interface. Buy SMS numbers directly within the web interface. To buy a WhatsApp or/and Viber number, forward a request.
- How to request a verified Viber sender
- How to request a verified WhatsApp sender
- How to buy an SMS number
Before you can proceed with connecting the Azure Bot Service with the Infobip platform, you need to prepare the following:
- API key
- Base URL
- SMS scenario key
- WhatsApp scenario key
- Viber scenario key
To create these scenario guides, refer to the Install Infobip Adapter for Microsoft Bot Framework section.
Once you have all this prepared, here are the things you need to provide to your dedicated Infobip Account Manager:
- App Secret – Random generated string that will be used as a payload signature. Messages that come to your endpoint and do not have the signature will be rejected.
- Bot URL – Infobip will forward all incoming messages on this endpoint. We will also complete the account configuration with the data provided.
Get an API key
- Log in to the Infobip web interface (opens in a new tab) and click Manage API Keys.
- To create a new API key, click Create API Key. Name your API key, set the expiration date, and select the Public API check box. The Allowed IP address is optional. Click Save.
Use the API key for request authentication and authorization. Use the same API key in SMS, WhatsApp, and Viber campaigns.
Get base URL
To obtain your Base URL, log in to the Infobip (opens in a new tab) and copy your base URL. The Base URL will look similar to: https://[baseURL].api.infobip.com/.
Install Infobip Adapter for Microsoft Bot Framework
Each channel has it’s own adapter which is installed via NuGet packages. Follow these guides for each channel:
• SMS guide (opens in a new tab)
• WhatsApp guide (opens in a new tab)
• Viber guide (opens in a new tab)