Rick Cogley's Tech Logr

Short Technical Laser Bursts %%

RC Logr 20190405 144845

Friday, 5 Apr, 2019

To avoid storing a credential in command line history, you can store it in a file and use cat to insert it when you need it. πŸ€“ Say you have your API token stored in /path/to/token, here is how you might use that:

1
~$> curl -X "POST" "https://service.com/apiv3/msg?content=test" -u '$(cat /path/to/token)'

RC Logr 20190405 144845 - To avoid storing a credential … Rick Cogley
Back to Home