in

To what URL should I send the RPC API requests?

I’m new to bitcoin and going through the documentation. Its not clear to me what URL should I send the RPC requests to interact with the blockchain? My understanding is that I should download Bitcoin Core and send requests to my own server to port 8332? Also, what if I wanted to make the request from a mobile app? Where should I send the requests to then or how would I go about that?

Doc says -> bitcoind
is more useful for programming: it provides a full peer which you can interact with through [RPCs](https://developer.bitcoin.org/reference/rpc/index.html) to port 8332 (or 18332 for testnet)



View Reddit by Wild_Ad2581View Source

Leave a Reply

Your email address will not be published.

GIPHY App Key not set. Please check settings

2 Comments

  1. Here’s an example connection string for a program that’s doing RPC calls:

    http://user:pwd@127.0.0.1:8332

    That works for your own local machine (localhost). If you are connecting from somewhere else within your own LAN then you’d use the IP address for the server, eg. 192.168.0.5

    If you’re wanting to connect from outside your LAN you need to take further steps. You configure your router to port forward to the system running bitcoind, and then connect to your public IP as provided by your ISP. There are guides around the web for that type of thing.

    Any time connecting from another system than the one running bitcoind you would need to add some conf lines to allow / white list external connections, plus maybe add firewall openings, if appropriate. It really depends on what you’re doing.

    eg. in bitcoin.conf

    rpcallowip=192.168.0.0/16
    whitelist=192.168.0.0/16

What do you think?

Litecoin Price Prediction

LTC/USD May Touch $220 Resistance

Vitalik Buterin Unveils Ethereum Scaling Roadmap!

Vitalik Buterin Unveils Ethereum Scaling Roadmap!