[GH-ISSUE #698] Authorization Headers not being sent when running ntfy sub when using default-user/password or default-token #513

Closed
opened 2026-05-07 00:24:58 +02:00 by BreizhHardware · 1 comment

Originally created by @CrimsonFez on GitHub (Apr 7, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/698

🐞 Describe the bug

When setting the default-user and default-password or default-token in ~/.config/ntfy/client.yml and trying to use ntfy sub/subscribe, the Authorization Headers are not sent. This is not the case with ntfy pub/publish

💻 Components impacted

💡 Screenshots and/or logs

❯ ntfy sub --trace test 'notify-send "$m"'
2023/04/07 11:22:19 DEBUG ntfy.domain.net/test Subscribing to topic
2023/04/07 11:22:19 DEBUG ntfy.domain.net/test Listening to https://ntfy.domain.net/test/json
2023/04/07 11:22:19 WARN ntfy.domain.net/test Connection failed: {"code":40301,"http":403,"error":"forbidden","link":"https://ntfy.sh/docs/publish/#authentication"}
2023/04/07 11:22:29 DEBUG ntfy.domain.net/test Listening to https://ntfy.domain.net/test/json
2023/04/07 11:22:29 WARN ntfy.domain.net/test Connection failed: {"code":40301,"http":403,"error":"forbidden","link":"https://ntfy.sh/docs/publish/#authentication"}

🔮 Additional context

Originally created by @CrimsonFez on GitHub (Apr 7, 2023). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/698 :lady_beetle: **Describe the bug** When setting the `default-user` and `default-password` or `default-token` in `~/.config/ntfy/client.yml` and trying to use `ntfy sub/subscribe`, the Authorization Headers are not sent. This is not the case with `ntfy pub/publish` :computer: **Components impacted** <!-- ntfy server, Android app, iOS app, web app --> :bulb: **Screenshots and/or logs** <!-- If applicable, add screenshots or share logs help explain your problem. To get logs from the ... - ntfy server: Enable "log-level: trace" in your server.yml file - Android app: Go to "Settings" -> "Record logs", then eventually "Copy/upload logs" - web app: Press "F12" and find the "Console" window --> ``` ❯ ntfy sub --trace test 'notify-send "$m"' 2023/04/07 11:22:19 DEBUG ntfy.domain.net/test Subscribing to topic 2023/04/07 11:22:19 DEBUG ntfy.domain.net/test Listening to https://ntfy.domain.net/test/json 2023/04/07 11:22:19 WARN ntfy.domain.net/test Connection failed: {"code":40301,"http":403,"error":"forbidden","link":"https://ntfy.sh/docs/publish/#authentication"} 2023/04/07 11:22:29 DEBUG ntfy.domain.net/test Listening to https://ntfy.domain.net/test/json 2023/04/07 11:22:29 WARN ntfy.domain.net/test Connection failed: {"code":40301,"http":403,"error":"forbidden","link":"https://ntfy.sh/docs/publish/#authentication"} ``` :crystal_ball: **Additional context** <!-- Add any other context about the problem here. -->
BreizhHardware 2026-05-07 00:24:58 +02:00
  • closed this issue
  • added the
    🪲 bug
    label
Author
Owner

@wunter8 commented on GitHub (Apr 7, 2023):

I was able to reproduce this. I will try to work on a fix

<!-- gh-comment-id:1500478611 --> @wunter8 commented on GitHub (Apr 7, 2023): I was able to reproduce this. I will try to work on a fix
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#513
No description provided.