Tidio Chat API library allows you to adjust Tidio Chat to fits your specific requirements.
Tidio Chat API is integral part of Tidio Chat and it can be called only after adding the code on site, if you didn't use our Tidio Chat, then visit our site https://www.tidiochat.com/signup to create new account.
- Add an Javascript code in code of our site, of course after loading Tidio Chat's library.
- Log in to https://www.tidiochat.com/panel then go to "settings > Preferences" section and click on "open editor".
API methods can be called with function .method, for instance. tidioChatApi.method(NAME_METHOD, ATTR1, ATTR2);
- setColorPallete - set widget's color
tidioChatApi.method('setColorPallete', '#ffffff', '#fff2222');
- badgeShow - shows widget's badge
tidioChatApi.method('badgeShow');
- badgeHide - hides widget's badge
tidioChatApi.method('badgeHide');
- messageFromVisitor - sends an message from user to operator.
tidioChatApi.method('messageFromVisitor', 'Hi this is message from visitor :)');
- messageFromOperator - sends message from operator to user
tidioChatApi.method('messageFromOperator', 'Hi this is message from operator :)');
- popUpOpen - shows chat's widget
tidioChatApi.method('popUpOpen');
- popUpHide - hides chat's widget
tidioChatApi.method('popUpHide');
- chatDisplay - show/hide chat, when chat will not be loaded but function will be called, then loading of chat will be postpone until the function with attribute "true" will be ran.
tidioChatApi.method('chatDisplay', true);
Events can be called with function .on, for instance. tidioChatApi.on(NAME_DETHOD, [FUNCTION]);
- resize - event is called when chat's widget change size
tidioChatApi.on('resize', function(dimension){
console.log('resize', dimension); // output: resize {width: 300px, height: 100px};
});
- popUpShow - event is called when chat's popup will be open
tidioChatApi.on('popUpShow', function(dimension){
alert('PopUp is showed!');
});
- popUpHide - event is called when chat's popup will be closed
tidioChatApi.on('popUpShow', function(dimension){
alert('PopUp is hiden!');
});
If you're having any issues with our product, please don't hesitate to contact us on [email protected]