Docs
Script Tag
Initialize Chat on Website
To deploy the chat to a website there is just one script tag needed:
Default Button creates an own chat button.
<script src="https://example.ws-chat.de/__frontend__/?js=1&lang=de&popup=20&mobilePopup=0"></script>
Target a custom button
<script src="https://example.ws-chat.de/__frontend__/?js=1&lang=de&popup=20&mobilePopup=0&button=%23chatToggle"></script>
You can specify a specific button (by using a url encoded query selector), if the customer don't want the default button.
Parameters
- js is required and must be 1
- lang is optional will fall back to 'de' if language is unknown Known languages are
- popup is optional and defines initial popup time in seconds (0 = never)
- popupMobile is optional and defines initial popup time for devices is smaller than 768px in seconds (0 = never)
- button is optional, defines button/s to toggle the chat (make sure to use url encoded for '#' (%23)) It is used as querySelectorAll, so you are able to use class (.name) or id (#name)
!!! If is set the default open button is not shown !!!
API
Instance API
/login
Logs in as an administrator. Cookies are set as HttpOnly cookies.
POST
{
"email":"john@doe.com",
"pass": "test"
}
GET /logout
Removes HttpOnly Cookie. Destroys session.
GET /user/active/all
Returns number of active non-admin chat users.
{
"data": 1 // 0 - Infinity
}
Initializor API