<blockquote>
<p>However, even when I enabled RPC server, when I use curl command which is specified on this wiki page: <a href="https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)</a>, it doesn't return any result.</p>
</blockquote>
<p>You need to configure a username and password for the JSON-RPC if you don't use <code>bitcoin-cli</code> (in the <code>bitcoin.conf</code> file, using the <code>rpcuser</code> and <code>rpcpassword</code> options, or alternatively the more modern and secure <code>rpcauth</code> option).</p>
<blockquote>
<p>Does anyone know if it is still possible to use JSON-RPC API with just bitcoin-qt installed?</p>
</blockquote>
<p>Yes, just enable the RPC server in the GUI, or start it with the <code>-server</code> command-line option.</p>
<blockquote>
<p>If not, is there a way to install bitcoind/bitcoin-cli without going through IBD since bitcoin core already has all the blocks installed? It seems like unnecessary to redownload all the blocks while they are stored locally.</p>
</blockquote>
<p>You can also install <code>bitcoind</code>, which has the RPC server enabled by default, but lacks the GUI.</p>
<p>If you run them with the same data directory you can even alternate between the two without redownloading. You can't run both simultaneously though, but there also shouldn't be any need, since <code>bitcoin-qt</code> also contains an RPC server.</p>
<p><code>bitcoin-cli</code> is independent, it's only an RPC client to communicate with either <code>bitcoind</code> or <code>bitcoin-qt</code>.</p>
<blockquote>
<p>If this is possible, how can I achieve this?</p>
</blockquote>
<p>Just install the relevant binaries. The DMG installer only contains <code>bitcoin-qt</code> I believe; if you want the other ones, you need to get the <code>.tgz</code> file.</p>

CC BY-SA 4.0
2023-02-10T22:03:22.507Z
How does the `curl` command should look like if you are using `rpcauth` option? RPC server seems to be enabled but still returning no result.

Also, where do I get `.tgz` file fore `bitcoin-cli`?
xor
CC BY-SA 4.0
2023-02-10T22:12:38.137Z
See https://bitcoincore.org/en/download/, under macOS tar.gz for the download.
Pieter Wuille
CC BY-SA 4.0
2023-02-10T22:16:20.027Z
The `curl` command would be something like `curl --user USERNAME:PASSWORD --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockchaininfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/'`. The USERNAME and PASSWORD are your username and password that you entered in the rpcauth tool (https://github.com/bitcoin/bitcoin/blob/master/share/rpcauth/rpcauth.py) to generate `rpcauth=` config line.
Pieter Wuille
CC BY-SA 4.0
2023-02-11T02:48:23.263Z
Thank you so much for the help
xor
CC BY-SA 4.0
2023-02-10T20:59:55.250Z
2023-02-10T21:13:00.617Z
2023-02-10T21:13:00.617Z
Pieter Wuille
<p>This might be simple question but I would highly appreciate if anyone can bring their wisdom on this.</p>
<p>If you install bitcoin-core software through <a href="https://bitcoincore.org/" rel="nofollow noreferrer">https://bitcoincore.org/</a>, it gives you dmg file that automatically install the bitcoin core (bitcoin-qt). I was assuming that you can still use JSON-RPC-API just with bitcoin-qt since it still communicates with the network and the GUI and RPC console. However, even when I enabled RPC server, when I use curl command which is specified on this wiki page: <a href="https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)</a>, it doesn't return any result.</p>
<p>Does anyone know if it is still possible to use JSON-RPC API with just bitcoin-qt installed?   If not, is there a way to install bitcoind/bitcoin-cli without going through IBD since bitcoin core already has all the blocks installed? It seems like unnecessary to redownload all the blocks while they are stored locally. If this is possible, how can I achieve this? Ideally, I think I should be able to use JSON-RPC-API just by installing bitcoin-qt from bitcoincore.org.</p>

CC BY-SA 4.0
2023-02-10T20:20:49.393Z
When I check GUI, I can see "Enable RPC server" checkbox is clicked.
xor
<bitcoin-core><json-rpc><mac>
How can I use the RPC API on Mac?
xor
# How can I use the RPC API on Mac?

(Asked by: username_0 on 2023-02-10)

This might be simple question but I would highly appreciate if anyone can bring their wisdom on this.

If you install bitcoin-core software through <https://bitcoincore.org/>, it gives you dmg file that automatically install the bitcoin core (bitcoin-qt). I was assuming that you can still use JSON-RPC-API just with bitcoin-qt since it still communicates with the network and the GUI and RPC console. However, even when I enabled RPC server, when I use curl command which is specified on this wiki page: <https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)>, it doesn't return any result.

Does anyone know if it is still possible to use JSON-RPC API with just bitcoin-qt installed? If not, is there a way to install bitcoind/bitcoin-cli without going through IBD since bitcoin core already has all the blocks installed? It seems like unnecessary to redownload all the blocks while they are stored locally. If this is possible, how can I achieve this? Ideally, I think I should be able to use JSON-RPC-API just by installing bitcoin-qt from bitcoincore.org.

**Tags:** bitcoin-core, json-rpc, mac

> **Comments:**
> **username_0**: When I check GUI, I can see "Enable RPC server" checkbox is clicked.  

---

## 1 answers

### Answer by username_1 on 2023-02-10. Score: 2 | Accepted answer

> However, even when I enabled RPC server, when I use curl command which is specified on this wiki page: <https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)>, it doesn't return any result.

You need to configure a username and password for the JSON-RPC if you don't use `bitcoin-cli` (in the `bitcoin.conf` file, using the `rpcuser` and `rpcpassword` options, or alternatively the more modern and secure `rpcauth` option).

> Does anyone know if it is still possible to use JSON-RPC API with just bitcoin-qt installed?

Yes, just enable the RPC server in the GUI, or start it with the `-server` command-line option.

> If not, is there a way to install bitcoind/bitcoin-cli without going through IBD since bitcoin core already has all the blocks installed? It seems like unnecessary to redownload all the blocks while they are stored locally.

You can also install `bitcoind`, which has the RPC server enabled by default, but lacks the GUI.

If you run them with the same data directory you can even alternate between the two without redownloading. You can't run both simultaneously though, but there also shouldn't be any need, since `bitcoin-qt` also contains an RPC server.

`bitcoin-cli` is independent, it's only an RPC client to communicate with either `bitcoind` or `bitcoin-qt`.

> If this is possible, how can I achieve this?

Just install the relevant binaries. The DMG installer only contains `bitcoin-qt` I believe; if you want the other ones, you need to get the `.tgz` file.

> **Comments:**
> **username_0**: How does the `curl` command should look like if you are using `rpcauth` option? RPC server seems to be enabled but still returning no result.  Also, where do I get `.tgz` file fore `bitcoin-cli`?  
> **username_1**: See https://bitcoincore.org/en/download/, under macOS tar.gz for the download.  
> **username_1**: The `curl` command would be something like `curl --user USERNAME:PASSWORD --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockchaininfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/'`. The USERNAME and PASSWORD are your username and password that you entered in the rpcauth tool (https://github.com/bitcoin/bitcoin/blob/master/share/rpcauth/rpcauth.py) to generate `rpcauth=` config line.  
> **username_0**: Thank you so much for the help  

---

