Mesibo Real-time and Backend APIs - Overview

Estimated reading time: 4 minutes

mesibo is a powerful real-time communication platform to quickly add robust and secure real-time messaging, group chat, voice and video calls, conferencing, and chatbot into your mobile and web applications.

The key objectives while designing mesibo APIs were security, reliability, performance, and scalability. We have seen APIs as complex as the universe making apps unnecessarily complex and error-prone. We have instead worked hard to make mesibo APIs simple to use, yet powerful. In just an hour, you should be able to start using Mesibo APIs in your code.

In this section, we will describe various Mesibo chat APIs in detail. However, before we move further, we highly recommend reading the get started tutorial and also referring to the source code of one of the mesibo sample apps in GitHub to learn how APIs are used. You can then refer to this section on a need basis.

There are two types of mesibo APIs

Real-time APIs for Android, iOS, Javascript, C++, Python, etc.

This is the API that you will integrate with your user-side applications (e.g., Android, iOS, Web, C++, Python, etc.). Mesibo real-time APIs allow users to communicate in real-time by providing APIs for messaging, calls, conferencing, etc.

There are two key components of Mesibo real-time APIs

  • Functions, which you can invoke. For example, to send a message, make a call, etc

  • Listeners, which mesibo will invoke for various events. For example, when you receive a message, receive an incoming call, etc. You can implement these listeners to get real-time notifications of events

Backend APIs (Server-side API)

Mesibo backend API is a set of REST-like HTTPS APIs which allows your backend servers to communicate with Mesibo to perform various administrative tasks such as creating and managing users, groups, accessing stats, etc.

For most Apps, the backend APIs play a very limited role of creating users and generating user access tokens which will be required by real-time APIs. Rest all functionalities can be accomplished by using Real-time APIs.

Refer to the Mesibo backend API document for for details.

Cross-Platform API Signatures

All the real-time APIs have exactly the same name and parameters across all the supported platforms unless specified. They only differ in the way they are invoked in various platforms like Java (Android), Kotlin (Android), Objective-C (iOS), Swift (iOS), C++, Javascript and Python. For example, the ‘setAccessToken’ API is invoked on various platforms, as shown below:

Java and Kotlin

mesibo.setAccessToken(token)

Objective-C

[mesiboInstance setAccessToken:token];

Swift

mesibo.getInstance().setAccessToken(token)

This makes it easy for you to write cross-platform code. In the following sections, we will describe APIs with name and parameters.

API Parameters

Although all the APIs have the same name and parameters across platforms, some parameter types may vary. For example, a parameter is of type string for a particular API, the String is used for that parameter on Java while NSString * is used for the same parameter on iOS Objective-C. The table below summarizes the generic type used in documentation and the corresponding type used in the actual implementation. If the parameter types are the same across platforms, they are not mentioned in the table, for example, int, MesiboProfile, etc.

Type Java Kotlin Objective-C Swift Javascript C/C++
String String String NSString * String var char * or const char *
boolean boolean boolean BOOL Bool var int (1 or 0)
byte[] byte[] byte[] NSData * NSData * var (array) char * or const char *
long long long uint64_t or uint32_t long var (array) uint64_t or uint32_t

Get Started with Mesibo APIs

Mesibo Real-time APIs are broadly classified in the following categories:

You can click on individual sections to go through each API category. Although, it is not necessary to go in the order but recommended for the first reading.

chat api, real-time chat api, backend api, chat api documentation, developer guide for chat app, sdk reference, types of api, messaging api user guide, http library