web3_clientVersion - Polygon
Learn how to use web3_clientVersion JSON-RPC method to retrieve the Polygon client version. Complete guide with examples for identifying node software and version info.
The web3_clientVersion method returns the current client version, which typically includes the client name and version number.
Parameters
None
Request
curl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "web3_clientVersion",
"params": [],
"id": "getblock.io"
}'import axios from 'axios';
const url = 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/';
const payload = {
jsonrpc: '2.0',
method: 'web3_clientVersion',
params: [],
id: 'getblock.io'
};
axios.post(url, payload, {
headers: { 'Content-Type': 'application/json' }
})
.then(response => console.log(response.data))
.catch(error => console.error(error));Response
{
"jsonrpc": "2.0",
"id": "getblock.io",
"result": "bor/v1.2.0-stable/linux-amd64/go1.21"
}Response Parameters
Field
Type
Description
jsonrpc
string
JSON-RPC version (2.0)
id
string
Request identifier
result
varies
Client version string
Use Case
The web3_clientVersion method is useful for:
Client identification
Debugging
Version checking
Error Handling
Status Code
Error Message
Cause
403
Forbidden
Missing or invalid ACCESS-TOKEN
-32600
Invalid Request
Malformed request body
-32602
Invalid params
Invalid method parameters
Web3 Integration
Last updated
Was this helpful?