""Forbidden" error when connecting to JSON-RPC API" error when connecting to multichain container via API calls

+2 votes

Hi Team,

I am running Multichain using docker containers. 
I got output when the below curl command in the docker container terminal. But the same curl command return an error Forbidden when I trigger from Host machine.

curl -X POST -H "Content-Type: text/plain" -H "Authorization: Basic bXVsdGljaGFpbnJwYzpBWHNpRWFoWmUxOVFncEN3WndGSlJMMzI3U3FjS3JGYVZ2MUZmcGVRR2lqMw==" -H "Cache-Control: no-cache" -H "Postman-Token: 1ac4e084-e8c8-10a2-f290-fd24fd13d1e0" -d '{
        "jsonrpc": "1.0", 
        "id": "1", 
        "method": "getinfo", 
        "chain_name": "icsv-chain",
        "params": [] 
    }' "http://127.0.0.1:22001/"

Thank you

asked Oct 20, 2020 by ACS

1 Answer

+1 vote

This is probably about the rpcallowip runtime parameter, which limits the IP addresses that are allowed to make requests to the JSON-RPC API. Lots of answers if you search this Q&A forum for rpcallowip.

answered Oct 20, 2020 by MultiChain
...