LogoLogo
Mluvii webLoginAPIDEMO
English
English
  • ABOUT
  • UPDATES MLUVII
    • 2.125
    • 2.124
    • 2.123
    • Archive
      • 2.122
      • 2.121
      • 2.120
      • 2.119
      • 2.118
      • 2.117
      • 2.116
      • 2.115
      • 2.114
      • 2.113
      • 2.112
      • 2.111
      • 2.110
      • 2.109
      • 2.108
      • 2.107
      • 2.106
      • 2.105
      • 2.104
      • 2.103
      • 2.102
      • 2.101
      • 2.100
      • 2.99
      • 2.98
      • 2.97
      • 2.96
      • 2.95
      • 2.94
      • 2.93
      • 2.92
      • 2.91
      • 2.90
      • 2.89
      • 2.88
      • 2.87
      • 2.86
      • 2.85
      • 2.84
      • 2.83
      • 2.82
      • 2.81
      • 2.80
      • 2.79
      • 2.78
      • 2.77
      • 2.76
      • 2.75
      • 2.72
      • 2.71
      • 2.70
      • 2.68
      • 2.67
      • 2.66
      • 2.65
      • 2.64
      • 2.63
      • 2.61
      • 2.60
      • 2.59
      • 2.58
      • 2.57
      • 2.56
      • 2.55
      • 2.54
      • 2.53
      • 2.52
      • 2.51
      • 2.50
      • 2.49
      • 2.48
      • 2.47
      • 2.46
      • 2.45
      • 2.44
      • 2.43
      • 2.42
      • 2.41
      • 2.40
      • 2.39
      • 2.38
      • 2.37
      • 2.36
      • 2.35
      • 2.34
      • 2.33
      • 2.32
      • 2.31
      • 2.30
      • 2.29
      • 2.28
      • 2.27
      • 2.26
      • 2.25
      • 2.24
      • 2.23
      • 2.22
      • 2.21
      • 2.20
      • 2.19
  • LICENSE TYPES
  • FOR OPERATORS
    • Login
    • Workspace
    • Accept client
    • Client interaction
      • WebChat
      • Client tab
      • Videocall
      • Share
      • Templates
      • Browser
      • End Session
      • Hero Cards
      • E-mail
      • Facebook Messenger
      • Apple Messages for Business
      • WhatsApp
      • VKontakte
      • IP Telephony
      • Telephone campaigns
    • Profile
  • FOR ADMINISTRATORS
    • Company management
      • Licences
      • Users
      • External contacts
      • Performance
      • Operator metrics
      • Dashboards
    • Tenant management
      • Contact directory
      • Sessions
      • All e-mails
      • Operators
      • Campaigns
        • Telephone campaign
          • Campaign Contacts
          • Missed Calls
        • WhatsApp campaign
          • Campaign Contacts
      • Settings
        • Groups
          • By operator utilization
          • To whole group (deprecated)
        • External groups
        • Routing
        • Rules
        • WebChat
        • Forms
          • Forms
          • Hero Cards
        • Chatbots
          • API chatbot
          • Microsoft Bot Framework chatbot
        • WhatsApp
          • Registration process
          • Adding a new phone number
          • Eligible Phone Numbers
          • Pricing
          • Template Messages
            • Conversations
          • Whatsapp ecosystem comparison
          • Data security and GDPR
          • Add WhatsApp widget to website
        • Apple Messages for Business
          • Add Apple widget to website
          • Data security and GDPR
        • Facebook Messenger
          • Add Facebook Messenger widget to website
        • VKontakte
        • E-mails
        • IP Telephony
        • Files
        • Templates
        • Routing visualization
        • Application
          • General
        • Blacklist
        • GDPR
  • FOR IT SPECIALISTS
    • Supported widget methods
    • Add WebChat button to website
    • Add Apple widget to website
    • Customization
      • Customized forms
        • Entry forms
          • Basic entry forms
          • Tenant selection forms
        • Feedback form
          • Basic feedback forms
          • Feedback forms with emojis
          • Feedback form with stars
        • Offline forms
      • Parameters
      • Customized Pop-up
      • Customized functions
      • Customized microsite
    • Public API
      • Authentication
      • Swagger
      • Public API FAQ
      • Webhooks
      • Webhooks FAQ
    • WIDGET API
    • Co-browsing
    • Mobile SDK
      • Android
      • iOS
    • Chatbot connection
      • Microsoft Bot Framework
      • API chatbot
        • API chatbot connection
        • Chatbot API-specific activities and events
      • Supported activities and events
      • Tips and Tutorials
    • Realtime statistics
      • Connection to influx database
      • Existing metrics
      • Examples
      • Grafana
    • Connect Office 365 mailbox
    • Connect Gmail mailbox
    • Software architecture
      • Data encryption
    • Telephony
    • Facebook
    • Files
    • WebChat
    • Cookies
    • Desktop Application
  • SECURITY
  • SYSTEM REQUIREMENTS
    • Minimum HW requirements for operators
    • Minimum SW requirements for operators
    • Supported browsers
    • Audio/Video
    • Supported languages
    • Desktop application
    • Minimum server requirements
    • Mobile application
  • HELPDESK
    • Bug Reporting
    • Manuals
      • Delete browser cookies
      • Delete Local and Session Storage
      • Clear cache memory
      • Add timestamps to logs in the browser console
      • Disconnecting inactive tabs in Google Chrome
    • FAQ
    • Keyboard shortcuts
    • Glossary
Powered by GitBook
On this page
  • Authentication
  • Activities Webhook Event Reference
  • Webhook Performance Requirements
  • Validating Webhook Events
  • Webhook Events
  • Webhook payload from mluvii
  • Ping
  • Activity
  • Session start
  • Send API
  • Performance Requirements
  • Support messages according to the communication channel
  • Good to know
  • Send activities
  • Next steps

Was this helpful?

  1. FOR IT SPECIALISTS
  2. Chatbot connection
  3. API chatbot

API chatbot connection

PreviousAPI chatbotNextChatbot API-specific activities and events

Last updated 1 year ago

Was this helpful?

Authentication

Chatbot api calls need to be authenticated by the following steps. The api key must have chatbot permission set.

Activities Webhook Event Reference

The mluvii application sends events to your webhook in order to notify your chatbot at the moment when a variety of interactions or events happen (e.g. when a client sends a message). Webhook events are sent by the mluvii application as POST requests to your webhook.

When an activity has been sent to your chatbot by chatbot mluvii session this callback will occur.

You can receive either text messages or messages with attachments. Main supported attachment types are image,text, audio, video, file. You can also get fallback attachments. A common example of a fallback is when a user shares some URL with a Page. You can encounter a fallback with no payload which is sent in case of unsupported shares made by users to your chatbot.

You can subscribe to this callback by setting callback url in .

Webhook Performance Requirements

Your webhook should follow the minimum performance standards:

  • Respond to all webhook events with a 200 OK.

  • Respond to all webhook events in 2 seconds or less.

If your webhook fails to meet either of the above requirements and it lasts more than 15 minutes your chatbot will be unsubscribed from receiving webhook events and your chatbot will be also disabled in mluvii.

Validating Webhook Events

It’s highly recommended to use authorization for the callback URL. You can use an access token or basic authorization in a URL.

Example callback URL:

https://www.example.com/api/access_token=YOUR_ACCESS_TOKEN

Webhook Events

The available webhook events are listed below. All webhook events are optional, so select those that are most relevant for the experience you are trying to create

Webhook Event
Description

ping

It’s reserved to verify service functionality. This type of event has to be implemented and its response should be 200 OK.

activity

Activity sent from user, operator or system. See the following list of supported activities sent to the webhook.

Webhook payload from mluvii

Ping

{
  "activity": "Ping"
}

Activity

{
  "activity": "Text",
  "timestamp": "2020-09-09T10:03:46.792954",
  "text": "Hello world!",
  "sessionId": 2359788,
  "language": "en",
  "source": "Default"
}

Session start

{
  "activity": "ConversationStarted",
  "timestamp": "2020-09-09T09:59:49.5640515+02:00",
  "sessionId": 2359753,
  "language": "en",
  "source": "Default"
}

Send API

The Send API is the main API used to send (deliver) messages to users. It covers text, attachments, structured message templates, sender actions, and more. Chatbot only respond to a conversation he has received and he is routed to it. Format of the API is available here.

Performance Requirements

Your request should meet the following performance standards:

  • Max request in one session is 120 requests or less in one minute

Support messages according to the communication channel

Each communication channel has its own specifics. Here you can find a list of all supported activities. In the first list you will find activities that are common across all channels. In the second, those that are only for WebChat.

Good to know

Facebook

  • Stricter rules must be followed for Facebook; all restrictions are available in the official documentation at https://developers.facebook.com/docs/messenger-platform/reference.

  • In case the chatbot sends an invalid message that cannot be displayed, this message will not appear in Facebook Messenger.

  • Facebook supports the display of a maximum of 3 buttons.

General

Each button has a limited number of characters.

It is not possible to send buttons without a text in the title, subtitle, or text.

Send activities

Every action between chatbot and mluvii session is called an activity. You need to know chatbotId to send activities. ChatbotId can be found in the url when editing a chatbot, e.g. ..../app/1/1/settings/chatbots/edit/166/general.

If you send a request, you will get an immediate response with status code 200 OK. If you are expecting a response, e.g. when sending GetAvailableGroups, you will also get an immediate answer 200 OK, but the actual result GetAvailableGroupsResponse will be sent to your webhook.

Each request should have the following format:

Request to /api/v1/Chatbot/{chatbotId}/activity

{
  "sessionId": "2359788",
  "type": "message",
  "text": "Sample text",
  "timestamp": "2020-09-09T10:03:53.4976861+02:00"
}

Next steps

Each session begins with an activity ConversationStarted. If Default is specified as the source, it is WebChat. For a complete list, see .

mluvii administration
Check supported activities and events
Session Source