Quick start guide to WatchData!
Quick start guide to WatchData! Learn how to create a key, make your first request and get to building!
- 3.Create an API key;⚙
- 4.Make a request.🎉
If you've never heard of us before, WatchData gives developers and enterprises easy and reliable access to Web3 tools and infrastructure. In this article, we will tell you how to get started with WatchData so you can connect to the Ethereum blockchain and get started building awesome applications.
We'll take a look at:
- Registering an account
- Creating an API Key
- Creating API queries via Postman
Watch this video, which describes the quick process of registering, getting an API KEY and using it
For a more detailed description, read the step-by-step guide
The first thing you need to do is go to WatchData.io and create an account. The only information needed to register your account is your email address.
First of all, you need to register.
Go to your email client and click on the link in the email to confirm your registration.
Click the button or the link and then go back to your original tab. You'll be automatically redirected to your personal dashboard.
To create an API key, you need to do the following steps: On the Dashboard.watchdata.io tab, click Create API key.
A pop up will appear in front of you, in which you need to fill in the fields
- Assign a name to your application
- Select the chain in which you plan to work
After you have completed these steps, click Сreate API key button
Congratulations, you were able to create your first API key!! Nice job 😎
In the example, we'll show step-by-step instructions for sending some sample queries via Postman. In addition to Postman, you can use data from the WatchData API in any application, using post and curl queries.
First, after you get the API key you have to connect to the blockchain.
For this you can copy your API key, or copy the HTTP Link at once, which will speed up your work several times!
The URL of the previously selected chain + your API Key is automatically substituted in the HTTP Link.
Note that each network requires a different URL
All you need to do is insert the previously generated link
Now everything is ready to send a request and receive data from the API. For the example, we'll look at the eth_blockNumber method first. Just copy the body of the example POST request.
In Postman select the Body tab, set Raw and JSON on it, insert the request, then click send.
Send a request and then we can see the answer at the bottom of the page.
A similar example of the request sent and response received for the eth_getBlockByNumber method. You can work in exactly the same way with any of the methods in our documentation.
You now know how to send requests and receive data from WatchData API 😎
In addition, the WatchData API can be used by being integrated into web3 SDK’s. Read an example of how to use the WatchData API to connect to the Ethereum network using Python through Web3.py, How to connect to the Ethereum network using Web3.js
If you have any questions on using the WatchData API you can always get help from the technical support via online chat on the website or in our discord.