I'm using curl to request from the monero-wallet-rpc, but somehow it does not recognize the user/password. I used the following command

curl -u user:password -X POST -d '{"jsonrpc":"2.0","id":"0","method":"getbalance"}' -H 'Content-Type: application/json'

I'm sure that the monero-wallet-rpc running correctly since I can connect throught it by using a browser, it ask for a user/password and it work.

2 Answers 2


Try to enable http digest authentication:

curl --digest
     -u user:password
     -X post
     -d '{"jsonrpc":"2.0", "id":"0", "method":"getbalance"}'
     -H 'content-type: application/json'

In addition to above correct answer if you use the username and password generated by the monero-wallet-rpc make sure to copy it correctly!


Starting monero-wallet-rpc with:

./monero-wallet-rpc --rpc-bind-port 18083 --wallet-file "/path/to/your/walletfile" --prompt-for-password

generates a new monero-wallet-rpc.18083.login login-credential file.

When printing the username:password combination from monero-wallet-rpc.18083.login with

cat monero-wallet-rpc.18083.login

it printed something like this for me:


The last character % is an escape character. The password is: uAD5d089I7VEm9sJTN9epA==

This curl succeeded:

curl --digest -u monero:uAD5d089I7VEm9sJTN9epA== -X post -d '{"jsonrpc":"2.0","id":"0","method":"get_balance"}' -H 'Content-Type: application/json'

Note: tested on Mac with Monero 'Oxygen Orion' (v0.17.1.1-release)

Your Answer

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

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