mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #991] Authentication issue - 40301 "Error publishing notification" #695
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#695
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @geekykant on GitHub (Dec 26, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/991
🐞 Describe the bug
I have setup authentication in ntfy to strictly allow only registered users to use the platform.
However publishing a notification throws 403 HTTP error.
Here is my config:
docker-compose.yml
nginx config
💻 Components impacted
💡 Screenshots and/or logs
The console logs I see are:
🔮 Additional context
The only additional change I added is authentication. WIthout that, it works perfectly fine.
I don't understand exactly why this error message comes up other than 403 error and webSocket connection failed.
@geekykant commented on GitHub (Dec 26, 2023):
Sorry, false alarm. But still valid for an enhancement as a proper message wasn't displayed in the UI, nor the REST response.
Solution: I missed to setup the Access control part, which sets permission for users to each topic. So go inside the docker container, and run the nfty access commands.
Troubleshooted it from the docker trace logs:
@geekykant commented on GitHub (Dec 26, 2023):
@binwiederhier Can we move this to enhancement - to possibly have proper failure messages displayed for access-control and permission related issues?
@snex commented on GitHub (Dec 8, 2024):
I am having this same issue even though I have set up my access control and the command line on the server shows my user as an admin.
edit: Weird.. it was happening because I was posting to the http url which should automatically forward to the https url. Apparently it is not forwarding something that the app thinks is important.
@anecdotal-testimonio commented on GitHub (Nov 18, 2025):
Hello,
I was having the same Issue. In my case I wanted to use unified push via ntfy.
I then realized that I needed to allow anonymous write only access to ntfy topics as described here and here
Hope this helps