Zcash API returning 401

Hi, I’m running zcashd on regtest mode. I’m trying to create a basic java application to check balance and other mundane stuff like zcash-cli, it’s just mine is a web version.

The problem is, when, I’m making an RPC call, the server is returning me 401, even though, I have no rpcuser and rpcpassword define in zcash.conf file.

##Zcash.conf
regtest=1
gen=1
genproclimit=-1

Can anyone help me with this?

It will still try to authenticate but it’ll fall back to using cookie authentication if no RPC user and password are set. It’s going to look in the data directory to handle the cookie auth so I’m guessing you’ll probably just want to set the username/password combo.