I am accessing my accounts and everything using Ethereum Wallet (Mist) but I was wondering is there any possible way to access my account using some http request?

  • 1
    Yes, but if you're not careful and don't do it safely and correctly, that means anyone online could also access your account with an http request. See ethereum.stackexchange.com/questions/3887/… – eth Aug 23 '16 at 9:36
  • Even I got {"jsonrpc":"2.0","error":{"code":-32600,"message":"EOF"}} when I hit local host. Prashant, Did u find any method? – nara Sep 9 '16 at 9:53
  • I have wrote a HTML script using web3, and I am able to access my accounts, contracts and everything that I could access from geth console. – Prashant Prabhakar Singh Sep 12 '16 at 10:29

Sure, but you need to launch geth with the web3 and personal modules:

geth --datadir myGethDirectory --rpc --rpcport "8000" --rpc-api "admin,db,eth,debug,miner,net,personal,web3"

Then you can either throw JSON objects at the loop back address on port 8000 or use web3 to interact with the client.

Note that anyone with access to the machine running geth will be able to use its RPC interface. So use this option only on trusted/secure networks.

For how to use web3 see this question and the documentation.

To unlock an account run:

web3.personal.unlockAccount("0x1234...", "password", timeout);
  • Thanks. but I have never worked with web3, so any help on how to use web3 to make https request to my account? – Prashant Prabhakar Singh Aug 24 '16 at 8:56
  • I've updated my answer. – Sebi Aug 24 '16 at 8:57
  • Thanks for support but the link provided contains whole web3 documentation. I specifically wanted to know How can I access my accounts using http request. Using web3 is quite general answer .Do I need to ask separate question for this? – Prashant Prabhakar Singh Aug 24 '16 at 9:47
  • I've updated my answer. – Sebi Aug 24 '16 at 10:31
  • I am puzzled with this question. Probably I couldn't make myself clear enough in question. I have used personal.unlockAccount(..) to unlock and access my account from geth console. What if I want to access my account from a web browser. If my rpcport is xxxx . Currently when I access http://localhost:xxxx/ I get {"jsonrpc":"2.0","error":{"code":-32600,"message":"EOF"}}. I wish if i could get my any details regarding my account here. – Prashant Prabhakar Singh Aug 24 '16 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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