<p>403 Forbidden means that your authentication is incorrect. Either your username or your password is incorrect, or both.</p>

CC BY-SA 4.0
2024-01-28T19:53:32.700Z
I double checked with my node and copied user and password from umbrel. still i get a 403
donbolli
CC BY-SA 4.0
2024-01-28T23:16:25.007Z
If you changed the config to use a different user and password, you will need to restart the node for it to take effect.
Ava Chow
CC BY-SA 4.0
2024-02-03T13:36:26.387Z
My research brought up, umbrel doesn't allow that. So i download Bitcoin Core and synced it. Now i get Connection refused (Errorno 111), what is missing?
donbolli
CC BY-SA 4.0
2024-01-28T18:28:20.333Z
2024-01-28T18:28:20.333Z
Ava Chow
<p>I have mangad to get closer to my goal.</p>
<p>My Code</p>
<pre><code># rpc_user and rpc_password are set in the bitcoin.conf file
rpc_user = &quot;umbrel&quot;
rpc_pass = &quot;pass&quot;
rpc_host = &quot;192.168.1.122&quot;
rpc_port = &quot;8332&quot;
rpc_connection = f&quot;http://{rpc_user}:{rpc_pass}@{rpc_host}:{rpc_port}&quot;
rpc_client = AuthServiceProxy(rpc_connection, timeout=240)
num_blocks = rpc_client.getblockcount()
print(num_blocks)
</code></pre>
<p>Which should just print out the BlockHeight of the node. But I get a 403 - Forbidden</p>
<p>Error Message</p>
<pre><code>Traceback (most recent call last):
  File &quot;/media/donbolli/code/python/bitcoin/crawler/test.py&quot;, line 37, in &lt;module&gt;
    num_blocks = rpc_client.getblockcount()
  File &quot;/media/donbolli/code/python/bitcoin/venv/lib/python3.10/site-packages/bitcoinrpc/authproxy.py&quot;, line 139, in __call__
    response = self._get_response()
  File &quot;/media/donbolli/code/python/bitcoin/venv/lib/python3.10/site-packages/bitcoinrpc/authproxy.py&quot;, line 186, in _get_response
    raise JSONRPCException({
bitcoinrpc.authproxy.JSONRPCException: -342: non-JSON HTTP response with '403 Forbidden' from server
</code></pre>

<python><umbrel>
RPC to Umbrel returns 403
donbolli
# RPC to Umbrel returns 403

(Asked by: username_0 on 2024-01-28)

I have mangad to get closer to my goal.

My Code

```
# rpc_user and rpc_password are set in the bitcoin.conf file
rpc_user = "umbrel"
rpc_pass = "pass"
rpc_host = "192.168.1.122"
rpc_port = "8332"
rpc_connection = f"http://{rpc_user}:{rpc_pass}@{rpc_host}:{rpc_port}"
rpc_client = AuthServiceProxy(rpc_connection, timeout=240)
num_blocks = rpc_client.getblockcount()
print(num_blocks)

```

Which should just print out the BlockHeight of the node. But I get a 403 - Forbidden

Error Message

```
Traceback (most recent call last):
  File "/media/username_0/code/python/bitcoin/crawler/test.py", line 37, in <module>
    num_blocks = rpc_client.getblockcount()
  File "/media/username_0/code/python/bitcoin/venv/lib/python3.10/site-packages/bitcoinrpc/authproxy.py", line 139, in __call__
    response = self._get_response()
  File "/media/username_0/code/python/bitcoin/venv/lib/python3.10/site-packages/bitcoinrpc/authproxy.py", line 186, in _get_response
    raise JSONRPCException({
bitcoinrpc.authproxy.JSONRPCException: -342: non-JSON HTTP response with '403 Forbidden' from server

```

**Tags:** python, umbrel


---

## 1 answers

### Answer by username_1 on 2024-01-28. Score: 0

403 Forbidden means that your authentication is incorrect. Either your username or your password is incorrect, or both.

> **Comments:**
> **username_0**: I double checked with my node and copied user and password from umbrel. still i get a 403  
> **username_1**: If you changed the config to use a different user and password, you will need to restart the node for it to take effect.  
> **username_0**: My research brought up, umbrel doesn't allow that. So i download Bitcoin Core and synced it. Now i get Connection refused (Errorno 111), what is missing?  

---

