0

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:[email protected]: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.

1 Answer 1

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.

1
  • 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? Jul 16 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.