⚡ Test Our Private Nodes of 40+ Blockchains just for $50!

coins coins coins coins

Method: POST personal_importRawKey

dropdown

# personal_importRawKey example for Ethereum (ETH)

POST personal_importRawKey

Method not allowed

Imports the given unencrypted private key (hex string) into the key store, encrypting it with the passphrase.

Returns the address of the new account.

Parameters

keydata - string

None

passphrase - string

None

Request

curl --location --request POST 'https://geth.getblock.io/mainnet/' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "personal_importRawKey",
"params": [null, null],
"id": "getblock.io"}'


Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}