In geth I can unlock my account via:

personal.unlockAccount(address, password, seconds)

in the web3js v1.0 I cannot find a similar function in the documentation.

How can I unlock my account with webjs v1.0?

1 Answer 1


I believe it's just web3.eth.personal.unlockAccount. If you search the page you linked to for unlockAccount, you'll see it mentioned as a TODO. (Keep in mind that 1.0 is still in beta.)


Per comments below, the issue was that --rpcapi personal was missing from the geth's command line.

  • I already tried that like so: web3.eth.personal.unlockAccount(coinbase, 'test', 10), but I catch an error: Error: Returned error: The method personal_unlockAccount does not exist/is not available => the function does not exist?
    – DrDirk
    Mar 8, 2018 at 19:02
  • What node are you connected to? I believe that error is coming from the node.
    – user19510
    Mar 8, 2018 at 19:23
  • I am working on my private chain hosed by geth v1.8.2-unstable-423c8bb1. Could you give me some detail on how to test if my private chain is the problem?
    – DrDirk
    Mar 8, 2018 at 19:27
  • Can you share your command-line parameters? Is personal included in your --rpcapi parameter?
    – user19510
    Mar 8, 2018 at 19:32
  • geth --datadir ./PrivateNet/chain --networkid 9987 --rpc --rpccorsdomain "http://localhost:8080" command to start the blockchain. And yes the problem was the missing --rpcapi eth,web3,personal. The documentation is given here Management APIS. Thanks a lot! Post an answer and I'll close this question.
    – DrDirk
    Mar 8, 2018 at 20:19

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.