<p>You can't, that's the point.</p>
<p>The rpcauth string is generated by the rpcauth tool, and contains a hash of your password. You authenticate exactly the same way: by providing the username and password. But you can't go back from rpcauth string to password.</p>

CC BY-SA 4.0
2023-07-16T19:47:06.773Z
BTW, in Bitcoin Core v25, there is bitcoin.conf file attached that contains commented out all options, among them there are
# Password for JSON-RPC connections
#rpcpassword=<pw>
(...)
# Username for JSON-RPC connections
#rpcuser=<user>

Why are those there if they are deprecated?
streamofstars
CC BY-SA 4.0
2023-01-10T15:02:41.330Z
2023-01-10T15:02:41.330Z
Pieter Wuille
<p>In bitcoin.conf, if the rpcuser/rpcpassword is specified, I can access the RPC via curl like this:</p>
<pre><code>curl --data-binary '{&quot;jsonrpc&quot;: &quot;1.0&quot;, &quot;id&quot;: &quot;test&quot;, &quot;method&quot;: &quot;getblockchaininfo&quot;, &quot;params&quot;: []}'  http://user:pass@127.0.0.1:8332/
</code></pre>
<p>Now that the rpcuser/rpcpassword option has been deprecated in favor of the new rpcauth option:</p>
<pre><code>rpcauth=user:3f7c53e8c31facfaabbccf7bc4c02775$4f81f1a9c46a366d55bdf2f94ad7ddeeaa8d37cab0942430f2beffc7aca5d916
</code></pre>
<p>How can the rpcauth string be used to authenticate curl access?</p>
<p>Thank you.</p>

<bitcoind><json-rpc>
bitcoind with rpcauth: how to use rpcauth with curl?
Simon L
# bitcoind with rpcauth: how to use rpcauth with curl?

(Asked by: username_0 on 2023-01-10)

In bitcoin.conf, if the rpcuser/rpcpassword is specified, I can access the RPC via curl like this:
curl --data-binary '{"jsonrpc": "1.0", "id": "test", "method": "getblockchaininfo", "params": []}'  http://user:pass@127.0.0.1:8332/

Now that the rpcuser/rpcpassword option has been deprecated in favor of the new rpcauth option:
rpcauth=user:3f7c53e8c31facfaabbccf7bc4c02775$4f81f1a9c46a366d55bdf2f94ad7ddeeaa8d37cab0942430f2beffc7aca5d916

How can the rpcauth string be used to authenticate curl access?
Thank you.

**Tags:** bitcoind, json-rpc


---

## 1 answers

### Answer by username_1 on 2023-01-10. Score: 2

You can't, that's the point.

The rpcauth string is generated by the rpcauth tool, and contains a hash of your password. You authenticate exactly the same way: by providing the username and password. But you can't go back from rpcauth string to password.

> **Comments:**
> **username_2**: BTW, in Bitcoin Core v25, there is bitcoin.conf file attached that contains commented out all options, among them there are # Password for JSON-RPC connections #rpcpassword=<pw> (...) # Username for JSON-RPC connections #rpcuser=<user>  Why are those there if they are deprecated?  

---

