Get Started with mesibo

Estimated reading time: 5 minutes

mesibo allows you to quickly add robust real-time messaging, group chat, voice, and video calls, conferencing, and chatbot into your mobile and web applications. mesibo offers powerful but easy-to-code APIs that you can master in no time.

In this short introduction tutorial, you will learn to use various mesibo APIs for messaging and calls for all the supported platforms. Once you complete these basic tutorials, you will be ready to create more complex apps, for example, messaging app (like Whatsapp) or multiparty Conferencing app (like Zoom).

You can download the source code of all the tutorials from our Github repos to quick-start your development! In addition to that, you can also download the source code of mesibo apps like Open-Source Messenger, Open Source Conferencing and then rebrand or customize it in any way you like, or deploy it commercially with zero restrictions.

Let’s get started.

Create an Account

Before you get started, sign-up to get a free mesibo account. This is a one-time activity, and you can use this account to build unlimited apps. Click here to create your account.

Create Account

Add real-time messaging and calls to your apps

mesibo makes it very easy to add real-time messaging and calls between your users. You only need to follow three steps, and your app will be able to send and receive messages, calls and conference calls.

Step-1: Create Users and User Access Token

mesibo need to know about your users so that mesibo can enable real-time messaging, calls, and conference between them.

Hence, you need to create a mesibo user for each of your app users. mesibo will generate an authentication token when you create a user. This user token is also called the access token. You need to send this token to your apps so that your can app can initialize mesibo real-time API using this token. We will learn more about creating user tokens, in the next section.

The best time to create this token is when a user logs in to your app using whatever login mechanism you are using. On successful login, create a mesibo access token and send it along with your other payloads. We have described this in detail in the Authentication section.

How mesibo works

Step-2: Initialize mesibo

Once you have created a user token and your app has it, you need to initialize mesibo real-time APIs using the token. We will cover initialization for each platform in their respective section. Below is an example,

//initialize mesibo real-time API with user token
mesibo.setAccessTokne("access_token_obtained_in_step_1");

// set database for saving messages
mesibo.setDatabase("myDB");

//start mesibo
mesibo.start();

That’s it. Your app will start connecting now and it is ready to send and receive messages, make calls, conferencing, etc.

Note that, Mesibo manages connection and reconnection every time your device connects to the network and hence you don’t need to worry about it. Whenever your app goes online or offline Mesibo_OnConnectionStatus will be called. You can even send messages when your device is not connected to the network and mesibo will send it automatically when it finds the connection next.

Step-3: Use Real-Time APIs to send messages and make Calls & Conferences

Once mesibo is initialized, your app is ready for 1-to-1 messaging, group messaging, voice & video calls, conferencing, chatbot, etc. mesibo Real-Time APIs have two components:

1. Real-Time Functions

Real-Time Functions which your app will call to perform various operations like initializing mesibo with the user token, sending messages, making calls, etc. For example,

  • to set the access token, use setAccessToken
  • to send a text message, use sendMessage
  • to send a file, use sendFile
  • to read messages from the database, use read

2. Real-time Callbacks

Real-Time Callbacks which mesibo API will call to inform you for various events like incoming messages, calls, etc. Since your app can receive messages or calls anytime, you instruct mesibo to let your app know as soon as it happens. You can do it by passing a Callback object to mesibo (using the addListener function). When a particular event occurs, mesibo will invoke an appropriate callback to let your app know about the event. For example,

  • when a message is received, Mesibo_OnMessage will be called
  • when a message is sent, delivered, or read Mesibo_OnMessageStatus will be called
  • when a call is received MesiboCall_OnIncoming will be called
  • when your app goes online or offline Mesibo_OnConnectionStatus will be called
  • ..., etc.

Here, we have provided a brief overview of mesibo APIs and we will quickly learn more about using these APIs in the next sections. For a more detailed explanation of how mesibo works, see Basic Concepts of mesibo

Next up in this tutorial series, we will learn how to create user tokens. Later, we will build your first mesibo app using messaging and call API.

Create Users and Tokens >>

communication platform, chat api, chat sdk, concepts, how chat api works, get started, setup, orientation, containers, messaging, group chat, audio call, video call, chat app, chat app ui