caronc / apprise-api

A lightweight REST framework that wraps the Apprise Notification Library
https://hub.docker.com/r/caronc/apprise
MIT License
580 stars 50 forks source link

Json payload to add attachments to a Discord notification #98

Closed namelivia closed 1 year ago

namelivia commented 1 year ago

:question: Question Hello! I'm trying to post a Discord notification but I have not been able to make the attachments show up, and after looking for a bit I was unable to find any information. Can I add like for example, an image url, or a youtube video url as attachments?

I'm trying the following POST request:

curl -X POST http://my-apprise-microservice:8000/notify/testing -H "Content-Type: application/json" -d '{"attach": ["https://my/image/1.png", "https://my/image/2.png", "https://my/image/3.png"], "body": "test"}'

2023-01-20 07:59:46,465 [INFO] apprise: Loaded 1 entries from memory://
2023-01-20 07:59:46,466 [INFO] apprise: Notifying 1 service(s) asynchronously.
2023-01-20 07:59:46,688 [INFO] apprise: Sent Discord notification.

The notification gets delivered but I can only see the body. The images are reachable at those urls. I've checked the logs but there is nothing about an error or anything, am I doing something wrong?

caronc commented 1 year ago

You're not the first one to request this service, but at this time, you can not send attachments through the API version of Apprise.

caronc commented 1 year ago

Closing this issue off as now Apprise API supports attachments in it's latest version :)

namelivia commented 1 year ago

This is awesome! I can't wait to try it! Thank you @caronc