-
-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Disable topic subscriptions through admin API #722
Comments
This video shows a new endpoint In the example, use Create ACL entry (similar to
Remove ACL entry:
Screencast_00067.webm |
WIP PR: #727 |
I added the following endpoints that can be used as admin user:
Here's an example flow using the new endpoints (updated May 15)
1. Add user
2. Grant read only access
3. List users and user grants
4. Subscribe as "marcus"
5. Revoke access from "silver" (kills connection 2)
6. Delete user "marcus" (kills connection 1)
|
Sounds good? |
Going to test your fast solution after my vacations; I'll be back on Sunday evening, so probably Monday-Tuesday I can test it :) |
Updated the endpoints and examples again. I think I'm happy with this and will merge it as-is. Given that it won't be released, we can still change it if you like @CreativeWarlock. Enjoy your time off. |
This is now part of v2.5.0. I'll leave the ticket pending confirmation that this is ok. |
The solution seems to fulfill our needs perfectly! I'll update NTFY on my server and need to implement these ACL commands in our backend services. From the looks of your example, I would expect it will work right away. Will report back soon. |
Small typo found in "1. Add User:"
('topic' was probably meant, but it's not being used in user creation which is fine as it is 👍 ) All other "CRUD" operations work fine. |
I guess in the app on the smartphone, our customers have to add their user name somewhere so that messages can be received on the topics they are subscribed / paying for. However, if I go to Any ideas what I might've done wrong? |
This seems correct to me. You are creating a user in this API call, and are assigning the tier User creation does not relate to topics at all. The flow is: (a) you first create a user using
The user management in the Android app is subpar. I will work on that in the near future. For now, you can add an existing (!) user like you said, but you cannot create a user in the Android app. That is correct. I may add that feature later, but it won't help your use case, IMHO. |
Thanks for the link to tiers. I have obviously overlooked that feature in your docs. Yes sadly, if users can't connect to nfty topics through the credentials they get from our system, i.e. after they register & subscribe to our product(s), the business case is not functional and we cannot move on. |
Wait a sec.. it IS possible to connect with an existing user to the server? That "Benutzer hinzufügen" (Add user) seems to be no link, so idk how to configure the app to use an existing user (that gets created & configured from my backend service). I'm most likely missing something - so any hint would be much appreciated! :) |
My apologies for the confusion regarding this "user add" feature. You are in the correct screen. To add an existing user in the Android app, you have to go to Settings -> Manage users -> Add new user" (Neuen Benutzer hinzufügen). And then add the user for whatever your server is. The likely reason it didn't work for you above is that you have to prefix the server with "http://" or "https://" in the "Server URL field, e.g. "https://ntfy.example.com" is correct, but "ntfy.example.com" will not work. As I said, the UX is quite annoying. 😬 |
Ah yes, sorry that I didn't try adding the protocol myself. (Btw. I wrote you on Discord because messages don't come through. It's maybe my server settings or something else is missing between NTFY server and the NTFY app.) |
Ok, your feature seems to work fine: I just sent a message to a topic, the NTFY server returned a success response and the message arrives in the app. However, with a delay of 30 minutes. |
Hello mate,
For a small startup business that a friend and I have been creating and which would integrate your cool notication service, we got a little feature request for NTFY.sh that allows managing user subscriptions through a given admin user, preferrably via POST requests.
The following diagram shows a simplified model of our business, where users pay for accessing signal services that send data over different NTFY topics (represented by Channel A, B, C).
For the case that our customers cancel their subcriptions with one of our products, we need something like a flag that can be toggled on/off via admin user (or however you think it best to realize) to ensure that messages are no longer forwarded to a user's endpoint (phone).
This would be beneficial to keep the number of topics small (T=1 topic for N users) rather than setting up individual topics, resulting in T x N topics. It would also reduce the customer's time to setup the topics on the phone with ideally short topic names.
Would this be technically easy to realize? Let me know if you need additional information.
Kind regards
Marcel
The text was updated successfully, but these errors were encountered: