Custom Notifications
Creating a custom notification for webhook-based push notifications

Preparation

Custom notifications are considered an advanced feature, and requires basic knowledge of JSON syntax and creating your own scripts/tools to handle sending the payloads.
    Read through the main Notifications page
    Copy any module's device-based or user-based webhook URL from LunaSea
You will need to slightly modify the webhook URL you have copied from any of the modules. Simply replace the name of the module within the webhook URL to custom and you're good to go!
Alternatively, you can copy the content of the URL after the last slash (after device/ or user/) to obtain your Firebase device or user identifier.

Endpoints

Custom notifications are supported by both device-based and user-based notifications, with full endpoint details below:
post
https://notify.lunasea.app
/v1/custom/device/:device:id
Device-Based
post
https://notify.lunasea.app
/v1/custom/user/:user:id
User-Based

Basic Troubleshooting

    Ensure that the required title parameter is a string type.
      If the type is not a string, the notification will fail.
      Sending no value or a null value will result in the title "Unknown Title" being used.
    Ensure that the required body parameter is a string type.
      If the type is not a string, the notification will fail.
      Sending no value or a null value will result in the body "Unknown Content" being used.
    If sending an image, ensure that the content is a valid URL.
      If the content is not a valid URL, the notification will fail.
      The URL must contain the protocol, http:// or https://.
      The URL must be a direct link to the image and does not redirect.
      The URL must be publicly accessible, not requiring any authentication to access.
    If sending an image, the image must be a supported image type.
      Supported types include JPGs, PNGs, and animated GIFs.
Last modified 7d ago