I have a Windows app I created that lets me manage all of my cryptocoin wallets from a single GUI. It uses the wallet the RPC API. However, I cannot get it to work with zcash. I have the zcash wallet running on an Ubuntu system and my app runs on a Windows laptop. I admit, I am a novice with Ubuntu but the zcash wallet is up and running and it has synched successfully. I can issue commands through the zcash-cli method locally and it works.
However, when I attempt to POST an http request to the zcash wallet from my windows app over a local area network I get an error â(401) Unauthorizedâ - this error typically indicates the userID or password is incorrect. I have verified and re-verified that the rpcuser and rpcpassword in the zcash.conf file are correct. As I said, I am using the same app to connect to several other wallets (all running on windows systems).
The zcash.conf file includes rpcallowip and rpcport (if these were wrong this would throw a different error - which I have tested).
Is there any reason the http post to the zcash RPC function would not work?
First, I want to thank those who responded to my question for their help. Your suggestions helped me zero in on the exact problem I was having.
âŚwhich I finally solved!. For future reference in case anyone else has this problem, the issue turned out to be the way windows provides the credentials to the http request handler in the wallet. Using the request Credentials property to provide the USER and password results in an authentication error (401 - Unauthorized). The solution is to build and add the authorization header in code instead.
I have not yet determined why this solution works or why the Credentials property doesnât. Since both methods work for my Windows based wallets I am assuming there is some kind of encoding difference going from Windows to Ubuntu that is resolved by creating the header manually.