"error": { "code": -32600, "message": "invalid json request" }

I use postman request https://mainnet.infura.io/v3/39bb15350b7e43338163d1e9ff618853?jsonrpc=2.0&method=eth_getTransactionByHash&params=[“0xc6eee520d8634c5426bd9f1040a8fc3dc3a4b0665d037bbae3e863b61e3bee0a”]&id=1
then response is {
“jsonrpc”: “2.0”,
“error”: {
“code”: -32600,
“message”: “invalid json request”
}
}
anyone can help me how to solve it .

Hi @liuminert are you attempting to open this link in a browser? Can you provide your code where this request is being made?

not a browser, is Postman, a Interface debugging tools .

Hi @liuminert, Infura does not support making JSON-RPC requests through form data. To make this request using Postman, first set your POST destination to:

https://mainnet.infura.io/v3/39bb15350b7e43338163d1e9ff618853

Then in Postman’s “Body” tab, select “raw” and paste in the following:

{"jsonrpc":"2.0", "id":1, "method":"eth_getTransactionByHash", "params":["0xc6eee520d8634c5426bd9f1040a8fc3dc3a4b0665d037bbae3e863b61e3bee0a"]}

Finally, in the “Headers” tab, add a key Content-Type and set it to application/json.

Let me know if that does not work!

1 Like

that works ,thank you.