Frequently Asked Questions - APIEstimated reading time: 3 minutes
- I am not getting connection status 1 - `online`
- How to get all active conversations and groups that a user is part of?
- Message sent from console but not recieved on the application
- How can I send a message to online users only?
- How can I get read receipts?
- What is Message Expiry?
- How do I restrict user access tokens to a particular app or domain?
I am not getting connection status 1 - `online`
setAppName API call.
Also, ensure that you are NOT using the App Token. App Token must be secret and should only be used from the backend API. You MUST only use user token in your real-time API.
Refer tutorial here https://mesibo.com/documentation/tutorials/first-app/#create-users-endpoints
How to get all active conversations and groups that a user is part of?
Use admin API
Message sent from console but not recieved on the application
Ok refer this Github Issue reported .
How can I send a message to online users only?
Set expiry to zero , then messages will be sent only in real time and to users who is online only.
How can I get read receipts?
In message parameters while sending a message, set flag like so:
p.flag = MESIBO_FLAG_READRECEIPT
What is Message Expiry?
The expiry represents the time within which a message has to be delivered. Expiry ranges from immediate (zero) to a few days and can be independently specified per-message basis at the time of sending messages. Mesibo will not deliver messages past its expiry. You can also set the expiry to zero for the messages that need to be delivered in real-time and not later. All messages will be retained by Mesibo until delivered or until their expiry is reached
For example, to set an expiry of 7 days you need to specify it in seconds (7 days * 86400 sec/day)
p.expiry = 604800
How do I restrict user access tokens to a particular app or domain?
User access tokens are only applicable to your App and issued only to authorized users by you and hence there is less possibility of anyone reusing it.
For Android and iOS, user access tokens are restricted to the Android package name or iOS bundle ID. They can not be used on apps having a different app or bundle ID. Refer to the User Management API to learn more, However, multiple apps with different package names or bundle ID can come under one mesibo app and can communicate with each other as long as you use corresponding package name or bundle ID while generating token for that particular app user.