Try to create ether wallet by privateKey from Metamask account
1 Answer
MetaMask does not provide a way to get the private key through code by design. Any interaction with accounts in MetaMask has to be done through the Web3 API, to prevent a (malicious) website from stealing a user's private keys.