mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 16:35:53 +02:00
[GH-ISSUE #1060] Documentation for Using Tokens via PowerShell Appears to be Incorrect #743
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#743
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 @theparadox1083 on GitHub (Mar 20, 2024).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1060
🐞 Describe the bug
In the documentation here: https://docs.ntfy.sh/publish/#access-tokens
The PowerShell 7+ example is
I tried this out and encountered two problems using Invoke-RestMethod as used in the example in the ntfy documentation.
Authorizationshould beAuthentication- your comment mentions the correct parameter but the example uses the a parameter that doesn't exist.Understandably, the second issue might require some explanation for anyone not familiar with PowerShell but the code below technically works. Ideally you'd want to import a SecureString from a file or vault or something but I don't see any other token examples make an effort to keep the token secret so I didn't bother with that in my recommended correction - I just convert on the fly which is absolutely not recommended.
💻 Components impacted
Documentation regarding Access Tokens and PowerShell 7+
💡 Screenshots and/or logs
Re 1:
Re 2:
🔮 Additional context
@binwiederhier commented on GitHub (Mar 21, 2024):
All the PowerShell stuff is contributed by other people, so I do not know what is best practice or works. WOuld you be able to create a pull request with your suggestions?
@theparadox1083 commented on GitHub (Mar 21, 2024):
Done - I just created my first PR ever! Hopefully I did it correctly?
@binwiederhier commented on GitHub (Mar 25, 2024):
Congrats on your first-ever PR. You did everything right. Thank you for your contribution!