Send Push Notifications via API
Use the Adalo API to send push notifications to Users of your app using iOS or Android.
Skill Level: Expert
Before You Begin
Triggering Notifications through the API is available on the Team or Business Plan.
It is not possible to send notifications to multiple users directly through the Adalo API.
Currently it is not possible to set which screen the user will be taken to. For now, they will be taken to the app's home screen.
If your app is using a Xano back end, then you must use the User ID to target a specific user.
GET ALL Endpoint for Users must be returned "As Self".
Setting up the Request
cURL
If you want a quick way to test this endpoint, run this curl from your command line. Make sure the replace the data with your app's data!
Request Headers
The base URL for the API request should be:
You will need to include the following headers:
Request Body
You will need to specify the following in the API request
App ID (you can find your App ID in the url when you are editing your app in Adalo)
Recipient Email or User ID
Push Notification Title Text
Push Notification Body Text
Targeting by Email Address
Targeting by User ID
Server Response
A successful request will return two parameters:
successful: [count]
failed: [count]
"Successful" means the notifications was delivered to your user's device. "Failed" means that the user no longer grants your app permission to send push notifications. If both are 0, then the user that the notification was sent to does not have your app installed on their device yet.
Here is a video tutorial for how to use the Adalo API to send a Scheduled Push Notification:
Troubleshooting Notifications
We have a few requirements that we recommend you check to troubleshoot any notification issues.
A notification will only be sent if;
The audience to send to exists (The users set to be the "recipient")
A notification will only be received if;
The recipient has the app installed on their device.
The recipient is logged in or has had activity in the app in the last two weeks to be considered active.
The recipient has permissions allowed (notification permission).
The recipient is not the user triggering the notification. I.e. the Logged in User is not triggering a notification to themselves.
If notifications are failing in iOS Native but not in Android, please delete your notifications Key in your Apple Developer account and push a new build.
Help
If you need additional help with this article, you can always ask in our community forum! Be sure to paste the link to this article in your post as well!
Do you have a tutorial or help doc request? Let us know!
Last updated