HomeDocumentationAPI Reference
Log In
API Reference

Register Scoped Session Key

Method Name

private/register_scoped_session_key

Registers a new session key bounded to a scope without a transaction attached.
If you want to register an admin key, you must provide a signed raw transaction.
Required minimum session key permission level is account

Parameters

expiry_secintegerrequired
Expiry of the session key
public_session_keystringrequired
Session key in the form of an Ethereum EOA
walletstringrequired
Ethereum wallet address of account
ip_whitelistarray of strings
List of whitelisted IPs, if empty then any IP is allowed.
labelstring
User-defined session key label
scopestring
Scope of the session key. Defaults to READ_ONLY level permissions.
enum adminaccountread_only
signed_raw_txstring
A signed RLP encoded ETH transaction in form of a hex string (same as w3.eth.account.sign_transaction(unsigned_tx, private_key).rawTransaction.hex()) Must be included if the scope is ADMIN.

Response

idstring or integerrequired
resultobjectrequired
result.expiry_secintegerrequired
Session key expiry timestamp in sec
result.ip_whitelistarray of strings or nullrequired
List of whitelisted IPs, if empty then any IP is allowed.
result.labelstring or nullrequired
User-defined session key label
result.public_session_keystringrequired
Session key in the form of an Ethereum EOA
result.scopestringrequired
Session key permission level scope
enum adminaccountread_only
result.transaction_idstring or nullrequired
ID to lookup status of transaction if signed_raw_tx is provided

Example

{request_example_shell}
{request_example_javascript}
{request_example_python}

The above command returns JSON structured like this:

{response_example_json}