MetaMask
wallet_requestPermissions
Summary: Requests additional permissions.
Requests additional permissions from the user. This method accepts a single permission per call. Specified by EIP-2255.
Parameters
Permission
objectObject containing the permission to request.
Returns
Permissions list
arrayAn array of the user's permissions.
Errors
Code
Message
4001
User rejected the request.
Customize request
Parameter
Value
Connect your MetaMask wallet to run requests successfully.
Request
await window.ethereum.request({
"method": "wallet_requestPermissions",
"params": [
{
eth_accounts: {}
}
],
});
Example response
{
"eth_accounts": {}
}