Get Started: Create Users and generate TokensEstimated reading time: 6 minutes
- Create Users
- Sending Media & Files
- Profile Management
- Sync Messages
Now since we are familiar with the basic concepts and anatomy of a mesibo app, we will now start creating a simple real-time app using Mesibo API for various platforms including
C++ (Linux, Mac, Raspberry Pi), and
Before we begin coding, let’s cover basic Mesibo Settings common across all the platforms.
Ensure that you have gone through the following prerequisites before you read further.
- Read about Type of Mesibo APIs in the Introduction section
- Signed-up and Logged-in to Mesibo Console
You are not required to go through Real-time APIs for now.
Mesibo APIs are very simple to use. You only need to perform the following steps to use mesibo APIs.
Create a mesibo application that will host all your users and groups. Once you create a mesibo application, you will get an
App Tokenthat you can use it to create access tokens, groups, and other administrative tasks using the mesibo backend APIs. Note that, App Token is secret and you should never expose it to your users. Hence, you MUST NOT use it in client-side APIs (Android, iOS, JS, etc).
Create users using backend APIs and the App Token that you have generated in step 1.
Create a user access token for each user that you need to use in client-side real-time APIs.
That’s it! Start messaging and calling using mesibo APIs.
Let’s say you are creating a new app FirstApp for Android, iOS, and web. Login to Mesibo console and create a new application FirstApp.
Once your application is created, note down the
App token. The App Token looks like the following:
We will need this
app token to create users and groups for this
App Token is secret and you should never expose it to your users. Hence, you MUST NOT use it in client-side APIs (Android, iOS, JS, etc)
Create Users and Access Tokens
Once you have created your application, it’s time to add users and groups. Typically, you will add users and groups dynamically on a need basis. However, for this sample app, you can create a few users and groups manually so that you can test messaging between them.
Note that all your users and groups are confined to an
Application. So there is no conflict when the same user is created by another application.
There are two ways you can create users for your mesibo application.
- Option-1 (Recommended) Create users using Mesibo backend APIs. In a real app, you need to create users on-demand using these REST based APIs
- Option-2 Create users in the mesibo console
We will explain both the ways of creating users - using REST APIs & using the console.
Backend API Playground
You may use Mesibo Backend API Playground to quickly familiarize yourself with the backend API syntax and parameters.
Create Users using Mesibo Backend APIs
Now we will create two users by using Mesibo backend API and the app token obtained in the previous step. The
user is a string. It can be anything that is unique to each user. For example, a phone number, a User-ID or whatever suits your app, as long as it’s unique across your Application.
Note that, you also need to pass the Android package name declared in the AndroidManifest.xml or iOS Bundle id declared in the Xcode project, for example,
com.mesibo.firstapp as appid while creating users. This is a security feature that restricts your users from using the user access token on intended platforms and the app only.
User Creation Request
- token = Application Token
setAppNameAPI call. Note that, for security reasons, the token generated for a particular appid will only be usable on app matching that appid.
- addr = end point address, for example, a user phone number.
You can find more about backend API in the reference section. The above API returns a JSON response like this,
token returned in the above API JSON response is the
access token, that will be used by real-time API to connect to mesibo real-time server (using
You can now create more users in a similar fashion so that you can test messaging between them. You can also send messages to a particular user using the console in the ‘Users’ section.
Create Users in the mesibo Console
To create users in the console,
- Click on the Settings icon of your app
- Click on the Users section in your app. Click on the
+ NEW USERbutton.
- To create a user, Enter a User Address and App ID. For example, the address can be
123and the APP Id can be something like
- Once a user is created, if you click on the edit button for the user you will be able to view the access token for that user.
Similarly, you can create more users in the console.
You can also create users from the console by clicking on the ‘New User’ button from the Application settings page.
It’s coding time now! We are now all set to create our first mobile app which can send and receive real-time messages.
From the next section onwards, we will start coding basic Mesibo applications on various platforms, starting with Android in the next section.mesibo, android, ios