2 min read - Posted 07 Dec 18

Infura 101 - Infrastructure for Dapps

Why use Infura?

Creating and maintaining your own Ethereum and IPFS nodes and infrastructure is complex and costly. Infura lets you focus on developing functionality by providing a secure, reliable, and scalable infrastructure for your Dapps that you don't need to worry about.

You access your Infura-hosted infrastructure via TLS-enabled endpoints, and Ferryman, a custom reverse proxy for scaling requests and instances.

Getting Started with Infura

The onboarding process for Infura walks you through creating an account and projects. You can assign each project to a different Ethereum network, and the project overview gives you the keys and addresses your application needs. The project overview also has a section for whitelisting contracts, and a secret key value, but these are reserved for future functionality.

You can get status information by issuing requests to your project endpoint, for example, to return the latest block:

curl -X "POST" "<PROJECT_ID>" \
     -H 'Content-Type: application/json' \
     -d $'{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber",
  "params": []

HTTP requests are useful, but to create a fully-fleshed Dapp, you can also use Web3.js.

First import the web3 library, and create a provider to the Infura project:

<script src="" integrity="sha256-nWBTbvxhJgjslRyuAKJHK+XcZPlCnmIAAMixz6EefVk=" crossorigin="anonymous">

if (typeof web3 !== 'undefined') {
    web3 = new Web3(web3.currentProvider);
} else {
    // Set the provider you want from
    web3 = new Web3(new Web3.providers.HttpProvider("<PROJECT_ID>"));

Then call the method, outputting the value to the interface:

<h2>Latest Block</h2>
  web3.eth.getBlockNumber(function (err, res) {
    if (err) console.log(err)


Once your Dapp has issued some requests to Infura, the Stats pane shows a summary of method calls and information about the bandwidth used.

Infura stats dashboard

Migrating from V2 to V3

If you used Infura before, make sure your applications are using the new* endpoints. If not, you need to re-register and update your Dapps to keep using Infura. BLOG POST?

Created with Sketch.Content is"CC-BY-SA 4.0" licensed
Article On-chain
Article Author

Chris Ward

Technical Content Lead




Related Articles
3Box - Social profiles for web3 applications

3Box provides social infrastructure to power decentralized applications and networks. Ethereum Profiles allow users to create a rich social presence that unites and gives them control over their data and experiences on the decentralized web. These built on our distributed social databases that let developers store and access information in users profiles, making distributed data infrastructure and sharing information between dapps much simpler. What is 3Box Head to and create your own pr

3Box.js: 7 Use Cases for Social Dapps

User profiles, onboarding, distributed data storage, encryption, and data sharing are just a few of the ways 3Box powers next-generation social dapps. This post provides an overview of 3Box.js and the use cases it enables. Most decentralized applications are social. Decentralized applications are designed around the premise that users in a trustless context can interact peer-to-peer. The trust needed to support this type of interaction is established primarily in two ways: the context of the int