Cannot connect to JSON-RPC API

+1 vote
I was trying to call the JSON-RPC api, locally it was fine but over the network it would not connect.
asked Aug 15, 2015 by anonymous

1 Answer

0 votes

If you want to allow non-local RPC connections, use the rpcallowip parameter in the multichain.conf for your blockchain. More information here:

(MultiChain supports Bitcoin Core's parameters.) 

answered Aug 15, 2015 by MultiChain

I tried doing so but still no luck. From network machine I am receiving forbidden as reply.

Node 1(server node) has multichain.conf file contents as
rpcallowip= // this is node 1
rpcallowip= // this is node 2

When I do RPC from same node (node1) it works fine. But if I use node2 for RPC I get forbidden.

The command I am using for RPC call is
curl --user multichainrpc --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddresses", "params": [] }' -H 'content-type: text/plain;'

my rpc port is 2652