MetaMask
wallet_requestPermissions
Summary: Requests additional permissions.
Requests additional permissions from the user. Introduced by EIP-2255.
Parameters
requestPermissionsObject object
PermissionObject
Returns
PermissionsList array
PermissionsList
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": {}
}