Community discussions

MikroTik App
 
knedlyk
just joined
Topic Author
Posts: 10
Joined: Sat Jul 18, 2020 4:18 pm

Sending notifications using Nextcloud Talk

Sun Jan 02, 2022 2:10 pm

Hi everybody! Wishing you a Happy New Year 🎆

In another viewtopic.php?p=902022#p902022 I was looking for the solution to replace pushbullet which sends the system notifications from Mikrotik router and other devices with Nextcloud Talk. Let me add, Nextcloud Talk allows anonymous users to post their messages as well. Through several consultations, I found that it is easy to send notifications for authorised (real) users, but not so easy for the anonymous ones:

Script which works fine for authorised users:
/tool fetch http-method=post http-header-field="Content-Type:application/json,OCS-APIRequest:true,Accept:application/json,Authorization: 'Basic <base64 encrypted password>'" http-data="{\"token\":\"<roomid<\",\"message\":\"hi there @all\"}" url="https://domain.tld/ocs/v2.php/apps/spreed/api/v1/chat/<roomid>"
For anonymous users, I was advised here https://github.com/nextcloud/spreed/issues/6736 to catch cookies https://stackoverflow.com/questions/307 ... s#37127263 and place them either to memory or in a separate file and re-use them again.

Sadly, the conversation on a Nextcloud forum hasn't brought much more help https://help.nextcloud.com/t/nextcloud- ... est/129956. The authors of the previous thread, which I have mentioned earlier, has suggested starting a new one. Perhaps, you have had already faced the same or similar challenge? I will be appreciative of your feedback.
 
knedlyk
just joined
Topic Author
Posts: 10
Joined: Sat Jul 18, 2020 4:18 pm

Re: Sending notifications using Nextcloud Talk

Mon Jan 24, 2022 12:22 pm

I didn't find a way how to change the script if I am using app passwords, when 2FA is enabled. Perhaps, some of you may have a clue?

Who is online

Users browsing this forum: No registered users and 18 guests