Skip to main content

Services documentation

Use services provided by MetaMask and Infura to optimize essential development tasks and scale your dapp or Snap.

Enable API request forwarding

For JSON-RPC methods, you can request failover protection by adding the failover header to your API request using curl, Web3.js, Ethers.js, or any other language of your choice.

For more information about this feature, including our partner and their privacy information, see Failover protection.

info

Failover support is available on Mainnet only.

Request

In the code tabs, the eth_blockNumber method is used as an example.

curl https://<network>.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Enable-Failover: true" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
On this page