Frequently Asked Questions - Webhooks and Push NotificationsEstimated reading time: 5 minutes
- What is webhook?
- How do I set up webhook URL for an App?
- 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.
Refer to the documentation on Mesibo Real-time Webhooks to know more about setting up webhooks.
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.
Refer to the documentation, Mesibo Real-time Webhooks to know more about selecting and handling webhook events.
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 the Mesibo console, and the rest will be taken care of by Mesibo.
Refer to the documentation on Mesibo Real-time Push Notification to know more about setting up push notifications.
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 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 the 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 push notifications from the webhook. Refer to the Push Notification Documentation where we have shared push scripts that you can use to send your own push notifications.
If you are using on-premise, enable Debug Logs from the Push Notification settings in the console. You can then see logs for every push request send to FCM or APN and the result.
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.
- Ensure that you are not using PushKit Tokens for regular notifications. iOS will terminate your app if you misuse PushKit tokens. Refer to Apple documentation and also WWDC talk Advances in App Background Execution.
- Use the Production Certificate, not the development certificate. Mesibo console will give you a warning but will accept the certificate. However, your device is likely not to receive push notifications.
- Don’t mess with the APS entitlements setting unless you know what you are doing. By default, it is set to development for the development and set to Production by Xcode when you upload your app to the App Store for release or test flight. This setting impacts the selected APN endpoint for sending push notifications. Hence, if you change this to say ‘Production’, you may need to send all your sandbox pushes to the production APN server
Refer to the troubleshooting guide in Mesibo Real-time Push Notifications to know more about troubleshooting push notifications.
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.