Channelize.io Chat API – A Guide to Integrate Chat in your Website in 1 Hour3 min read
In the early and mid-2000, email was the most commonly used medium for user-to-user communication. However, delays in responses and less interactivity make emails very inefficient.
Overcoming these drawbacks, instant messaging came into the picture and became a new trend because of ease of use and quick responses. The proliferation of mobile devices with connectivity on-the-go, native device features like push notifications & rich keyboard, and easy media sharing further made real-time chat the best medium of communication.
Besides features, benefits and all other sweet things that real-time Chat offers, there are myths like:
– Integrating ready-to-use Chat APIs and SDKs is time-consuming.
We’ll show how it can be done in just 1 hour. This hands-on tutorial shows you how to add user-to-user chat on your website in just 3-steps using Channelize.io’s feature-rich Pre-built UI.
Let’s get started!
Step 1: Get your Channelize.io Application keys
- Choose a Plan and signup on Channelize.io, or use the Free Trial.
- Create an Application.
- In your Channelize.io application’s dashboard go to Overview > Application Credentials and copy your Public and Private Keys.
Step 2: Implement User-Authentication
To provide users secure access to chat, implement user-authentication in Channelize.io Chat API integration. By default, Channelize.io API provides two user-authentication methods:
- Authentication with User ID
- Authentication with Email and Password
In the previous article, we talked about the difference between both these methods, who should use which one, and how to implement them.
Step 3: Add ready-to-go Pre-built Chat UI to your website
This Pre-built UI code can also be used in UI / JS frameworks such as React, AngularJS, etc.
Step 4: Data Migration and Synchronization
To enable conversations between users, you must have those users created in your Channelize.io application.
If your website has existing users, relationships and historical chat data, then you may migrate them to your Channelize.io application before launching Chat in production. We have a Channelize.io sync server that allows migration without any data loss and downtime. Read more at our developer documentation for migration.
If you have a new website with no users or data to be migrated, then proceed with data synchronization using Channelize.io Platform APIs for the below events:
- Create user – When a new user signs-up on your website.
- Update user – When a user information is updated i.e Display Name, Profile Image, etc.
- Create Connection – When a new connection is established between two users. (For more on Connections feature, please read our previous blog-post.)
- Block/unblock a user – When a user blocks/unblocks another user.
Users will be able to search other users in the Pre-built UI to initiate Chat, or conversations can be created using the Create a Conversation API.
Read our Platform APIs developer documentation to know other API functions we provide and use them as per your requirements.
At this point, you should have a basic real-time chat enabled on your website. Users would be able to search for other users and start a conversation.
We’re all ears to know what you want to achieve with Chat. Please feel free to book a short call with us, or send us an email at: email@example.com.