Setup
Missive Live Chat works on top of Twilio’s Conversations API. Before creating your chat account, you first need to sign up for a Twilio account to get your Twilio credentials.
Once it's done, head over to your Accounts settings on Missive and add a Missive Live Chat account.
Get your Twilio credentials
Both your Account SID and Auth Token are available in your Twilio dashboard page:

Install on your website
To install the chat on your website, select the Setup page where you can copy the HTML code snippet that you need to paste into your website.

Customization
Configuration
Here’s an example of all the available options and their default value. Most of them can be set from the Setup page of your Missive Live Chat account settings and will be instantly applied to all your chat widget instances.
If an option is set both from your Setup page and in your HTML, the HTML one will be used.
JavaScript API
Missive Live Chat provides a JS API to let you programatically interact with the widget on your website.
It is required to wrap any usage of window.MissiveChat inside or after the onReady callback that you can define on your configuration object.
open()
Opens the chat widget popup window.
close()
Closes the chat widget popup window.
showButton()
Shows the chat widget button. This doesn’t open the chat widget popup window, it only applies to the chat button.
hideButton()
Hides the chat widget button. This doesn’t close the chat widget popup window, it only applies to the chat button. Set chat: { hidden: true } in config to hide by default.
setUser({ name, email, digest })
Identify a logged in user. See “Identify and verify logged-in users” documentation below.
setMeta({})
Attach custom data to messages. Overwrites meta with the given object. language, platform and browser are always included and cannot be removed.
addMeta({})
Add custom data to your messages. Adds given object to the meta object without overwriting already set values.
setVariables({})
Update the styling variables.
Attach data to messages
Missive Live Chat messages include data to provide information about the person currently chatting with you. This data is displayed in the Contacts sidebar and will use the last message data.
Defaults
By default, each message will include language, platform and browser.

Custom
Custom data can be provided by setting a meta object on the w.MissiveChatConfig object or via the JavaScript API (see above). A simple key/value object is expected.

Identify and verify logged-in users
Identify
To identify your logged-in users, you must define a user key on the w.MissiveChatConfig object. The user object must have an email and optionally a name property.
Just like visitors entering a name/email themselves, these messages will be marked as [Unverified] on Missive. That is so you’re aware that anyone could provide fake info.
Verify
You can verify your users by adding a digest property to the user object. The digest must be generated from the Secret key available in your Missive chat settings using the user’s email address as the encrypted content.
Get your secret key in your chat account settings:

Here’s how to encrypt with Ruby, Node.js and PHP. Other languages have equivalent functions.
You must then define this computed digest in the user object of the w.MissiveChatConfig object.
Messages marked with [Cannot verify]? That means that while a digest was provided, it doesn’t match with the one generated by our server. Someone may be trying to impersonate one of your users or your encryption is incorrect.
Last updated