For the complete documentation index, see llms.txt. This page is also available as Markdown.

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
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "web3_clientVersion",
    "params": [],
    "id": "getblock.io"
}'
request.js
import axios from 'axios';

const url = 'https://go.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?