> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phantom.com/llms.txt
> Use this file to discover all available pages before exploring further.

# request

> Send JSON-RPC requests to Phantom's EVM provider to connect, sign messages, and send transactions.

Sends a JSON RPC request to the wallet.

## Params

`method: string;` `params?: unknown[] | object;`

## Returns

`Promise<unknown>`

## Example

```javascript theme={null}
const accounts = await window.phantom.ethereum.request({ 
    method: "eth_requestAccounts", params: [] 
})
console.log(accounts)
// ["0xDAFEA492D9c6733ae3d56b7Ed1ADB60692c98Bc5"]
```

The code above demonstrates how you can use the `request` method to ask the user to connect to your dapp.\
\
The `request` method is the go to way for you to interface with the wallet in your dapp. It accepts most [JSON RPC requests](https://ethereum.org/en/developers/docs/apis/json-rpc/#json-rpc-methods) that would need to interact with the wallet. \
\
However it **will not** work for methods that don't make sense for a wallet. For example, you can't use the provider object Phantom injects to call something like `eth_getTransactionByHash`. If you send a method that the provider object does not support, it will throw an error. For a full list of errors, see [Error messages and codes](../errors).
