Skip to content

Advanced_Use

“wzn556” edited this page Oct 28, 2024 · 5 revisions

Send message in the form of JSON through HTTP request POST

  • HTTP:
    • URL: https://send-notifyme.521933.xyz
  • Headers: Content-Type:application/json
  • JSON:
{
    "data": {
        "to": "d-NnQPgQTYGF_JhRK6iFiB:APA91bET0S07sI1bOYBQ7FrWMBcQ53SyxnwO-ODXP19mDzku4ZijawFSQFT_LZ5cUqKPjDbd61-UBzzNiiiz_vkkYoK6jnu-zWU2qo1mDKYdy2wnjsZ99g_9j-vZ-5sm2QwNDWYAF_vh",
        "ttl": 86400,
        "priority": "normal",
        "data": {
            "title": "NotifyMe!",
            "body": "This is a test message!",
            "group": "Messages",
            "bigText": false,
            "iconType": 0,
            "smallIcon":"smallIcon_0",
            "largeIcon":"largeIcon_0",
            "id":"0",
            "encryption":false,
            "iv":"UkAjUPykxX1Eu4h7",
            "invisible":false,
            "actionType":"0",
            "action":"",
            "channel":"quicker_channel"
        }
    }
}

JSON Interpretation

  • to: The value is the token of device which used to receive the message.
  • ttl: How long (in seconds) the message should be kept in FCM storage if the device is offline. The maximum time to live supported is 2419200( 4 weeks), and the default value is 4 weeks if not set. Set it to 0 if your want to send the message immediately without keeping in FCM storage.
  • priority: Notifications priority. Can take normal and high.
    • normal: Messages are delivered immediately when the app is in the foreground. For it is in the background, the delivery may be delayed.
    • high: FCM attempts to deliver high-priority messages immediately even if the device is in doze mode.
  • title: The notification's title.
  • body: The notification's body.
  • group: Grouping messages. Grouping messages to make it easy to find message that you need, the value can be set freely.
  • bigText: The notification's big text. It fits the sence that users need to view the whole notification which has a body with many words in the status bar. You are advised to set the value to be true for SMS forwarding.
  • iconType and smallIcon: The notification's small icon. See Set Small Icons for details.
  • largeIcon: The notification's large icon, The value is the name when the icon is created. The icon won't display in notification if it was not set or value does not exist.
  • id: The notification's id, The new notification will override the old notification with the same id in the status bar, Can take [1,+∞) . The value can also be 0, which means that the App automatically sets the notification id to ensure that the existing notification will not be override.
  • encryption: Encrypt or not. The encryption method is AES/CBC/PKCS5Padding , The encrypted content is title and body . Please use AesKey in App/Settings to encrypt, initialization vector iv should fill in the iv item which can be created by yourself.
  • iv: Initialization vector for AES encrypt,It is 16 bytes long and used for the App to decrypt data.
  • invisible: Whether notifications are visible, when set to true, notifications' title and body will not be displayed.
  • actionType and action: Notification click action, see Notification Click Action for details.
  • channel: The notification's channel, The value is the name of channel which is set by you. The channel is default if it was not set or value does not exist.

Others

See below for Usage Scenarios

  1. SmsForwarder
  2. Qinglong
  3. Quicker

Clone this wiki locally