#778·apprise

API for message body limits

Author: DownrightNiftyCreated Dec 6, 2022Updated May 10, 2026
Labelsenhancement

Thanks for your work on this library! As described in #198, message length limits are hardcoded for each notification service in the source code and are also posted on the service's wiki page. It would be convenient if there were an API to access this information. You can use the overflow directive to handle the case where messages that are too long (by splitting or truncating the message) but, as mentioned in the documentation, in many cases that doesn't work well and a custom splitting/truncation function is desired.

I think it would make sense to expose this info in the Apprise object's details(). For now, this seems like the best way to get the information (though not ideal because it is accessing private fields):

python
a = apprise.Apprise.instantiate(service_url)
print(a.body_maxlen)