Updated on 2023-12-06 GMT+08:00

Using cURL to Send JSON-RPC API Requests

Request example (with credential)

curl -k -X POST https://your-http-endpoint/your-credential/jsonrpc --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":64}'
Request example (with IAM token)
curl -k -X POST 'X-Auth-Token:your-iam-token' https://your-http-endpoint/jsonrpc --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":64}'

Response example

{
    "jsonrpc": "2.0",
    "id": 64,
    "result": {
        "startingBlock": "0x32e92c",
        "currentBlock": "0x32e92e",
        "highestBlock": "0x32e92e"
    }
}