1. Home
  2. bloXroute Documentation
  3. bloXroute-cli
  4. Using RPC with User and Password

Using RPC with User and Password

To enable user and password protection for the Gateway’s RPC, start the Gateway with the --rpc-user and --rpc-password arguments set to the values you want. Those values are stored during the Gateway startup in its configuration file.

Once you configure the Gateway to allow access to RPC using a username and password, you must use the bloxroute-cli using the --rpc-user and --rpc-password arguments.

<<< bloxroute-cli --rpc-user my_user --rpc-password my_password
>>> peers
[
{
"id": null,
"type": "BLOCKCHAIN_NODE",
"addr": "XXX.XXX.XXX.XXX 30303",
"direction": "OUTBOUND",
"state": "INITIALIZED"
}
]