Introduction

There are 3 types of API available for visitor chat window. Following are the available API.

  • API for Chat form

  • API for Chat Button

  • API for Language

Basic API Usage

API Usage Example. i.e set name for visitor

DEFINITION
$_REVECHAT_API(function(){ … });
<script type="text/javascript"> 
	window.$_REVECHAT_API || (function(d, w) 
	{ 
		var r = $_REVECHAT_API = function(c) {r._.push(c);}; w.__revechat_account="3577764";w.__revechat_version=2;
		r._= []; var rc = d.createElement("script"); rc.type = "text/javascript"; rc.async = true; rc.setAttribute('charset', 'utf-8');
		rc.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'static.revechat.com/widget/scripts/new-livechat.js?'+new Date().getTime();
		var s = d.getElementsByTagName('script')[0]; s.parentNode.insertBefore(rc, s);})(document, window);

	$_REVECHAT_API(function()
	{
		$_REVECHAT_API.Form.Online.setName(“john”);

	});
</script>

Any questions? Please email us at support@revechat.com

Last updated