[Feature Request] Allow custom endpoint URLs for notifications
 
Notifications
Clear all

[Feature Request] Allow custom endpoint URLs for notifications  

  RSS
DonFilipe
(@donfilipe)
Active Member
[Feature Request] Allow custom endpoint URLs for notifications

I'm trying to develop a tool with the PrusaLink API and am currently stuck at getting the notifications. Since the only available options are Slack, Telegram, Discord and Browser, my idea was to setup some PHP script which mimics a Discord webhook endpoint and takes the content according to the Discord webhook api specification. Unfortunately, when I try to do so Prusa Connect tells me that my endpoint url is invalid.

Is there any chance to provide a custom endpoint url to receive notification data in the future?

Best Answer by _KaszpiR_:

You can have custom url in any in those, I use my private web server as an endpoint for slack. Afair there is no url check, unless they recently added it.

The only thing it does is just different parameters passed to the endpoint, based on the selected formatting so that sent message as json has different object structure, those are really small differences between slack and discord.

I strongly recommend using echo-server as an example what comes in.

Posted : 15/02/2024 4:09 pm
_KaszpiR_
(@_kaszpir_)
Prominent Member
RE:

You can have custom url in any in those, I use my private web server as an endpoint for slack. Afair there is no url check, unless they recently added it.

The only thing it does is just different parameters passed to the endpoint, based on the selected formatting so that sent message as json has different object structure, those are really small differences between slack and discord.

I strongly recommend using echo-server as an example what comes in.

See my GitHub and printables.com for some 3d stuff that you may like.

Posted : 15/02/2024 5:54 pm
DonFilipe
(@donfilipe)
Active Member
Topic starter answered:
RE: [Feature Request] Allow custom endpoint URLs for notifications

Thank you, I will definitely try the echo-server thing out. Do you also see a "!" icon next to your endpoint url in the notification settings? Maybe they just do validation for a warning but still send data and that means I'm doing anything wrong. But maybe the echo-server will help

Posted : 15/02/2024 6:36 pm
DonFilipe
(@donfilipe)
Active Member
Topic starter answered:
RE:

Okay I just found it out by testing with an echo server what I did wrong, thanks for this amazing tip 🙂 Anyways, there is a URL validation when configuration Discord endpoint URLs but it still sends the data even though the URL might be invalid. When using the Slack tab there is no such validation.

This post was modified 10 months ago by DonFilipe
Posted : 15/02/2024 7:03 pm
DonFilipe
(@donfilipe)
Active Member
Topic starter answered:
RE: [Feature Request] Allow custom endpoint URLs for notifications

Okay sorry for the spam but I can't edit my posts for some reason. 

It seems that the URL validation is the same everywhere. I was tricked because the echo server worked, but when I tried to add my own server again it doesn't work, no matter which tab (Slack, Discord, ...) I choose. I will keep trying but it would be really helpful to understand what the endpoint url is actually validated against

Posted : 15/02/2024 7:19 pm
JoanTabb
(@joantabb)
Veteran Member Moderator
RE: [Feature Request] Allow custom endpoint URLs for notifications

Hi, 
Unfortunately due to heavy spamming, Prusa decided to restrict editing rights to a very short time window. which leads to the issue you have noted
regards Joan

I try to make safe suggestions,You should understand the context and ensure you are happy that they are safe before attempting to apply my suggestions, what you do, is YOUR responsibility. Location Halifax UK

Posted : 15/02/2024 10:20 pm
Tojik liked
_KaszpiR_
(@_kaszpir_)
Prominent Member
RE: [Feature Request] Allow custom endpoint URLs for notifications

@DonFilipe and what do you enter as url that it does not work?

See my GitHub and printables.com for some 3d stuff that you may like.

Posted : 15/02/2024 10:51 pm
DonFilipe
(@donfilipe)
Active Member
Topic starter answered:
RE: [Feature Request] Allow custom endpoint URLs for notifications

Sorry for the late reply. Now I finally found out what's going on - I think 😅 I chose the wrong path on my web server and it seems that Prusa Connect is just checking if the given endpoint exists (maybe some status code check). After I fixed it, the checkmark icon appears next to the endpoint url. When I delete the files from my webserver again, the "!" again can be seen. So it was all on my side, sorry for this. But in the end it's working, so thanks a lot! 🙂

Posted : 17/02/2024 1:39 pm
_KaszpiR_ and Tojik liked
Share: