Closed theparadox1083 closed 8 months ago
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?
Done - I just created my first PR ever! Hopefully I did it correctly?
Congrats on your first-ever PR. You did everything right. Thank you for your contribution!
:lady_beetle: 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.
Authorization
should 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.
:computer: Components impacted Documentation regarding Access Tokens and PowerShell 7+
:bulb: Screenshots and/or logs
Re 1:
Re 2:
:crystal_ball: Additional context