Introduction
Welcome to the documentation for creating Azure Bot services bots to use with MoyaApp Messenger API. If you run into any issues, or have questions or feedback, please let us know by sending a message to api-support@moya.app.
Creating bot with Azure Bot Services
Please refer to the Bot Framework SDK documentation for examples of how to create a chat bot on Azure Bot Services.
Integrating Chatbot with Messaging API
Required Parameters
The following parameters will be required to integrate the newly created bot with Moya messaging platform.
Phone number: The phone number to listen on
moya_auth_token
: If you already have a messaging account with us and wish to plug Azure Bot Services into this please provide us with it. If not then we will generate one on the phone number specified above.Bot URL: URL to access the chatbot. Our integration uses Direct Line API 3.0 and the URL should look like
https://europe.directline.botframework.com/v3/directline/conversations
where europe is the region in which your bot is hosted.Azure Authentication Token: Required for authentication when sending messages to the bot.
Azure Bot Services to MoyaApp setup
Once all the parameters above are ready please email them to api-support@moya.app
Interacting with Chatbot
In order to interact with and test the chatbot you can send a message to the API phone number. You can also test the chatbot by sending a curl request.
Example Request
curl -X 'POST' \
'https://lex-gateway.moya.app/webhook/<lex bot phone number>' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"message":
{
"type":"text",
"from":"number to receive response",
"text":
{
"body":"chatbot wake word/phrase"
}
}
}'
Example Response
{
"message": "success"
}