Chat creation

To make chat appear on your site copy javascript code from constructor to your site html head element. It's enough to put it once. Site chat will be updated automatically on constructor settings change.

On-the-fly creation

Let's say you need a separate chat for each city. To prevent creation of thousands chats in constructor - generate chat identity chatPath and pass it to ChatbroLoader function which draws the chat. See example below.

Use web constructor or plugin whenever possible. Use chatPath identity only with dynamic chats creation.

Spoofing protection. Calculated at server on the basis of the transmitted parameters as md5(siteDomain + siteUserExternalId + siteUserFullName + siteUserAvatarUrl + siteUserProfileUrl + permissions + secretKey). You can find your secretKey in chat constructor just enable Spoofing protection. Parameters siteDomain and secretKey are always necessary. Other can be ignored if you do not use them in the ChabroLoader. Example: https://codepen.io/ChatBro/pen/booKRx?editors=0010 More infoDefault null

permissions

Array

An array of allowed moderation methods. Used only in conjunction with the signature parameter. Possible values are: ban (the ability to ban users), delete (the ability to delete messages). Example: https://codepen.io/ChatBro/pen/booKRx?editors=0010Default []

Single Sign-On

The user, having gone the authentication procedure on your site, logs in to the chat. The chat will use the same nickname and avatar as on the site. A link to user profile will also be available. Example implementation.

Message filtering

To avoid unwanted messages, you can enable message filtering on the server side. You can do this in the chat constructor, in the "Administration" section. The filter function use JavaScript. Return statement use a Java object with static methods that return various actions (for example accept, change or decline message and other).

Incorrect signature

Signature is a unique string generated on the user's server based on the parameters passed to the ChatbroLoader function. The signature is compared on the server ChatBro, providing protection of the chat from substitution of users and not allowing copying to the other websites. If spam protection is enabled, the chat will only work if the signature is calculated correctly and the site's domain corresponds to the one transmitted. More about spoofing

How to fix?

The easiest but not the best way to get rid - to disable the spoofing protection in the chat constructor. Go to Chatbro, "My chats", select the chat, click "edit". In the "authentication" section, clear the "spoofing protection" check box. Check the correctness of the entered parameters to solve the problem.

The minimum set of parameters passed to the function:

md5(siteDomain + secretKey)

Function for example in JavaScript: crypto.createHash('md5').update('localhostd60c97a2-ae7a-47a3-a72f-4a5b645711ec').digest('hex')

The transmission method with additional parameters (some except for the minimum can be omitted, the order is also important):