mirror of https://github.com/caronc/apprise
Page:
Notify_ntfy
Pages
CLI_Usage
DemoPlugin_Basic
DemoPlugin_WebRequest
Development_API
Development_Apprise_Details
Development_Contribution
Development_LogCapture
Home
Notification_Graveyard
Notify_Custom_Form
Notify_Custom_JSON
Notify_Custom_XML
Notify_Revolt
Notify_africas_talking
Notify_apprise_api
Notify_aprs
Notify_bark
Notify_boxcar
Notify_bulksms
Notify_bulkvs
Notify_burst_sms
Notify_chantify
Notify_clicksend
Notify_d7networks
Notify_dapnet
Notify_dbus
Notify_dingtalk
Notify_discord
Notify_email Fastmail
Notify_email
Notify_emby
Notify_enigma2
Notify_faast
Notify_fcm
Notify_feishu
Notify_flock
Notify_freemobile
Notify_gitter
Notify_gnome
Notify_googlechat
Notify_gotify
Notify_growl
Notify_guilded
Notify_homeassistant
Notify_httpsms
Notify_ifttt
Notify_join
Notify_kavenegar
Notify_kodi
Notify_kumulos
Notify_lametric
Notify_line
Notify_lunasea
Notify_macosx
Notify_mailgun
Notify_mastodon
Notify_matrix
Notify_mattermost
Notify_messagebird
Notify_misskey
Notify_mqtt
Notify_msg91
Notify_msteams
Notify_nexmo
Notify_nextcloud
Notify_nextcloudtalk
Notify_notica
Notify_notifiarr
Notify_notifico
Notify_ntfy
Notify_office365
Notify_onesignal
Notify_opsgenie
Notify_pagerduty
Notify_pagertree
Notify_parseplatform
Notify_plivo
Notify_popcornnotify
Notify_prowl
Notify_pushalot
Notify_pushbullet
Notify_pushdeer
Notify_pushed
Notify_pushjet
Notify_pushme
Notify_pushover
Notify_pushsafer
Notify_pushy
Notify_reddit
Notify_rocketchat
Notify_rsyslog
Notify_ryver
Notify_sendgrid
Notify_serverchan
Notify_ses
Notify_seven
Notify_sfr
Notify_signal
Notify_simplepush
Notify_sinch
Notify_slack
Notify_sms_manager
Notify_smseagle
Notify_smtp2go
Notify_sns
Notify_sparkpost
Notify_splunk
Notify_spontit
Notify_streamlabs
Notify_stride
Notify_synology_chat
Notify_syslog
Notify_techulus
Notify_telegram
Notify_threema
Notify_toasty
Notify_twilio
Notify_twist
Notify_twitter
Notify_voipms
Notify_wecombot
Notify_whatsapp
Notify_windows
Notify_workflows
Notify_wxpusher
Notify_wxteams
Notify_xbmc
Notify_xmpp
Notify_zulip
Sponsors
Troubleshooting
URLBasics
config
config_text
config_yaml
decorator_notify
persistent_storage
showcase
6
Notify_ntfy
Chris Caron edited this page 2024-07-11 20:37:04 -04:00
Table of Contents
Ntfy Notifications
- Source: https://ntfy.sh/
- Icon Support: No
- Attachment Support: yes
- Message Format: Text
- Message Limit: 32768 Characters per message
Ntfy is a easy to use messaging service.
Syntax
Ntfy can send notifications through the following modes:
- private: A locally hosted private server (github source)
- cloud: A setup pointing to https://ntfy.sh
Valid syntax is as follows:
ntfy://{topic}
ntfy://{host}/{topic}
ntfy://{host}:{port}/{topics}
ntfy://{user}@{host}/{topics}
ntfy://{user}@{host}:{port}/{topics}
ntfy://{user}:{password}@{host}/{topics}
ntfy://{user}:{password}@{host}:{port}/{topics}
ntfy://{token}@{hostname}/{targets}
You can specify more then 1 topic such as:
- ntfy://{user}:{password}/{hostname}/{topic1}/{topic2}
Parameter Breakdown
Variable | Required | Description |
---|---|---|
user | *No | The user account to perform the authentication with |
password | *No | The password to perform the authentication with |
hostname | *No | The ntfy server you're sending your notification to. |
port | No | The port the ntfy server is listening on. By default the port is 80 for ntfy:// and 443 for all ntfys:// references. |
topic | Yes | All notifications to a ntfy server MUST have at least one topic defined. |
token | No | This is detected, but can otherwise be explicitly specified as a parameter. |
mode | No | The authentication mode is automatically detected based what it parses from the URL provided. You only need to set this if you feel it is being detected incorrectly. The possible modes are private and cloud and are explained above. |
auth | No | Can be set to either basic (default) or token . basic is for User/Password authentication with the Ntfy server while token assumes that the provided credentials was a Authorization Token and authenticates in a different fashion. |
No | An email to associate the ntfy post with. | |
tags | No | The ntfy tags to associate with the ntfy post. Use a comma and/or space to specify more then one. |
attach | No | Specify a web URL pointing at a remote attachment you would like the post to reference. |
filename | No | This is only used if the attach was also provided. The ntfy server is smart enough to determine what the filename is automatically from this; however if you wish to provide a custom-override to this value, this is where you do it from. |
click | No | Provide a hyperlink that you want users who receive your notification to advance to if they click on it. |
priority | No | Provide a priority such as max , high , default , low , or min . By default default is used if one isn't otherwise provided. |
delay | No | Identify a delay for the message reception |
image | No | This defaults to 'Yes' and hauls in the image associated with the notification |
avatar_url | No | Optionally over-ride the Apprise Icon notifications and explicitly identify your own |
Example
Send a ntfy notification to our server
# Assuming our {hostname} is localhost
# Assuming our {topic} is great-place
apprise -vv -t "Test Message Title" -b "Test Message Body" \
ntfy://localhost/great-place
We can also send a notification to the ntfy.sh server:
# Assuming our {topic} is great-place
apprise -vv -t "Test Message Title" -b "Test Message Body" \
ntfy://great-place
Ntfy also supports Markdown; if you want to leverage this, simply add ?format=markdown
to your Apprise URL; eg:
# Assuming our {hostname} is localhost
# Assuming our {topic} is great-place
# Assuming we want to leverage the markdown support
apprise -vv -t "Test Message Title" -b "# Markdown Support" \
"ntfy://localhost/great-place?format=markdown"