Quick Start

The simplest voice, video and text chat SDK for your website.

First, create a sample!

Let's start by creating two simple HTML files and adding the basic AtomChat code to it. This will be sufficient to see a working sample.

HTML
HTML

Be sure to replace chat_appid with your App ID from the AtomChat Admin Panel -> Settings -> API Key.

Save both the files and then access them using two different browsers like Firefox and Chrome. You will be able to see AtomChat at the bottom right corner of your site page.

Integrating AtomChat with an existing website

Now, you're ready to add AtomChat to your site.

Before you add the AtomChat code, you need to know the code that you can use to output (e.g. echo $_SESSION['name']) the logged in user's unique ID and name.

Once you have this information handy, add the following code to your site template-

HTML

Once you've done this, AtomChat will log you in and allow you to chat with other online users.

Below is the list of optional parameters of AtomChat

  • chat_link This variable is used to set the user profile page URL in AtomChat. Once you set this variable user can easily redirect to the other user’s profile page.

Example : var chat_link = ‘https://www.xyz.com/user/2/profile’;

  • chat_avatar This variable is used to set the user profile image URL in AtomChat. You have to pass the profile image URL to the chat_avatar variable.
  • chat_friends This variable is used to set the friends of the logged-in user in AtomChat. You have to pass the list of friends ids in a comma-separated format.

Example: var chat_friends = ‘23,2548,458,300’;

  • chat_language This variable is used to set the language of your chat_box. By default the language is English. If you want to translate your chatbox messages in different languages like France, Arabic, Chinese. You have to pass the google translate language code to this variable.

Please note: Before using this variable you have to add the specific language in languages Section in your AtomChat Admin Panel. Go to your AtomChat Admin Panel-->Localization-->Languages add the languages from available languages.

Example: var chat_language = ‘fr’;

  • chat_email This variable is used to set the email address of logged in user in AtomChat. You have to pass the email ID of a logged-in user to this variable. This variable is available only when the Offline Email Notification feature is enabled.

Example: var chat_email = ‘xyz@gmail.com’;

Please refer to the below-mentioned example to implement these variables.

JS

You're ready to explore more

There is a lot more to AtomChat!. You can synchronize your users' friends list, restrict features using role based access control, launch a single private chat window, display our Embedded Layout (instead of Docked Layout) and a lot more.