Frequently Asked Questions - Webhooks and Push NotificationsEstimated reading time: 4 minutes
- What is webhook?
- How do I set up webhook URL for an App?
- What are the webhook parameters?
- Can I select the events for which I want to receive webhooks?
- Is there any limit on the number of times a webhook is invoked?
- How do I send a push notification to users?
- I am not able to receive push notifications on the app, what should I do?
- I am not able to receive push notifications for iOS, what should I do?
- Is it possible to deliver messages via email?
What is webhook?
A WebHook is an HTTP(S) URL which will be invoked with POST data in real-time by Mesibo when something happens; for example, an offline message, a user comes online or goes offline etc.
How do I set up webhook URL for an App?
You can set webhook url for an App using backend API or from mesibo console.
Ensure that your webhook is responding to GET and POST requests outside your network. Use online tools like https://www.site24x7.com/check-website-availability.html to check if your webhook is reachable and outputting “OK”
What are the webhook parameters?
Webhook is invoked with the following parameters:
- secret - secret which you entered in the mesibo console
- uid - User Id
- aid - APP Id
- from - sender
- to - destination
- e - logical OR combination of one of the following events
- 0x10 - User is Online
- 0x20 - User went offline
- 0x100 - Messages
Can I select the events for which I want to receive webhooks?
Yes, you can select the events for which webhook should be invoked. For example, an offline message, a user comes online or goes offline etc.
Is there any limit on the number of times a webhook is invoked?
There is no hard limit. However, Mesibo automatically optimizes and decides based on your webhook usage if the next webhook call is necessary. For example, an offline message indication for a user may not be invoked again until that user comes online or for a certain duration.
How do I send a push notification to users?
Mesibo will automatically send push notification to offline users if there is a message or a call for them. All you need to do is configure your Firebase Cloud Messaging and Apple Push Notification credentials in Mesibo console and rest will be taken care of by Mesibo.
I am not able to receive push notifications on the app, what should I do?
By default, mesibo sends background push notifications that are not visible (data type in Android and background or VoIP type in iOS).
It wakes your app in the background and then the application can start mesibo to receive all the messages and calls. This is the recommended way of receiving push for real-time application as it gives you the finer control. However, You can change this default behavior from the mesibo console by disabling the
Background push checkbox. It will then send visible push alerts (notification type in Android and alert type in iOS).
If you still don’t get the push, check the following:
- Ensure that you have configured push-notification credentials for your app correctly on the mesibo console.
- Keep your phone on the cellular data and see if you are receiving push notifications
- See if other apps on your phone receive it
Note that mesibo has no role in push, it only sends push as per the push token and push credentials set by your app. If nothing works, bypass mesibo and send a push notification yourself and see if it helps. Setup the mesibo webhook which will be invoked when the destination is offline. You can then send a push notification from the webhook. Refer to the Get-started tutorial where we have shared push scripts that you can use it to send your own push notifications.
I am not able to receive push notifications for iOS, what should I do?
- Ensure that you are using the Universal Push Notification Client SSL Certificate WITHOUT any password.
- Use Development entitlement for development. Mesibo push assumes development entitlement for the sandbox apps and it accordingly pushes using development or production APN servers. Apple will reject the push notification if the sandbox token is sent to the production server and vice versa.
- If you are using production (distribution) entitlement for development, enable sending sandbox pushes as production in the mesibo mesibo console.
Is it possible to deliver messages via email?
You can use a webhook to deliver your messages to email or any third-party channels. When a message arrives, mesibo can invoke your webhook depending on the settings you have selected in the mesibo console. You can then send emails from your webhook to your users.