How do I pull a password saved in Phabricator's Passphrase Application?
Let's assume that we've added a password titled "My Password" to Passphrase application, now we want to reuse this password in some automation software so we need a way to pull a password using command-line or something. How would you do it?
You can make it using Conduit API and passphrase.query.
To learn how to use it you should go to https://your-phabricator.com/conduit/method/passphrase.query/
arc
or curl
command to issue query:echo '{"ids": [1], "needSecrets": 1}' | arc call-conduit --conduit-uri https://your-phabricator.com/ --conduit-token passphrase.query
curl https://your-phabricator.com/api/passphrase.query \
-d api.token=api-token \
-d ids[0]=1 \
-d needSecrets=1
curl https://your-phabricator.com/api/passphrase.query \
-d api.token=api-token \
-d ids[0]=1 \
-d needSecrets=1 | jq -r '.result.data[].material.password'