# wallet_requestSnaps

> Reference documentation for the `wallet_requestSnaps` method of the Snaps API.

<SnapsAPIReference method={{"name":"wallet_requestSnaps","description":"Request permission for a dapp to communicate with the specified Snaps and\nattempt to install them if they're not already installed.\n\nIf the Snap version range is specified, MetaMask attempts to install a\nversion of the Snap that satisfies the range. If a compatible version of the\nSnap is already installed, the request succeeds. If an incompatible version\nis installed, MetaMask attempts to update the Snap to the latest version that\nsatisfies the range. The request succeeds if the Snap is successfully\ninstalled.\n\nIf the installation of any Snap fails, or the user rejects the installation\nor permission request, this method returns the error that caused the failure.","parameters":{"kind":"primitive","type":"Record<string, { version?: string }>","description":"An object mapping the IDs of the requested Snaps to optional SemVer version\nranges. The SemVer version ranges use the same semantics as NPM\n`package.json` ranges."},"result":{"kind":"primitive","type":"Record<string, { error: JsonRpcError } | Snap>","description":"An object mapping the IDs of the requested Snaps to either the installed Snap\nor an error if the Snap failed to install or was not permitted."},"subjectTypes":["snap","website"],"examples":[{"examples":[{"language":"ts","content":"const result = await snap.request({\n  method: 'wallet_requestSnaps',\n  params: {\n    'npm:@metamask/example-snap': {},\n    'npm:@metamask/another-snap': { version: '1.2.3' },\n  },\n})\n"}]}],"restricted":false}}  />
