<p>See the configuration guide in the bcoin repo: <a href="https://github.com/bcoin-org/bcoin/blob/master/docs/configuration.md" rel="nofollow noreferrer">https://github.com/bcoin-org/bcoin/blob/master/docs/configuration.md</a></p>
<p>bcoin uses an API key for authentication, without username.</p>
<p>Bcoin always runs with an RPC interface, whether or not an api key has been set.</p>
<p>If you have any more questions, join us on telegram: <a href="https://t.me/bcoinorg" rel="nofollow noreferrer">https://t.me/bcoinorg</a></p>
<p>Example:</p>
<pre><code># start the server
$ bcoin --network=regtest --daemon

# Make an rpc request
$ bcoin-cli --network=regtest rpc getinfo
{
  &quot;version&quot;: &quot;2.1.2&quot;,
  &quot;protocolversion&quot;: 70015,
  &quot;walletversion&quot;: 0,
  &quot;balance&quot;: 0,
  &quot;blocks&quot;: 0,
  &quot;timeoffset&quot;: 0,
  &quot;connections&quot;: 0,
  &quot;proxy&quot;: &quot;&quot;,
  &quot;difficulty&quot;: 4.6565423739069247e-10,
  &quot;testnet&quot;: true,
  &quot;keypoololdest&quot;: 0,
  &quot;keypoolsize&quot;: 0,
  &quot;unlocked_until&quot;: 0,
  &quot;paytxfee&quot;: 0.0002,
  &quot;relayfee&quot;: 0.00001,
  &quot;errors&quot;: &quot;&quot;
}
</code></pre>

CC BY-SA 4.0
2022-08-05T21:45:54.030Z
Ok, let me try it out without an api-key.
Seth Harrington
CC BY-SA 4.0
2022-08-05T21:26:26.030Z
2022-08-05T21:26:26.030Z
pinhead
<p>I've recently been introduced to bcoin. In the documentation, it's stated that bcoin's RPC interface is similar to that of Bitcoin Core but after syncing my node, I can't find a way to set up a JSON RPC Server on Bcoin to communicate with my app. The documentation clearly does not specify any methods such as rpcuser, rpcbind, rpcpassword values. Is there a way to set this up with bcoin in the bcoin.conf file?</p>

CC BY-SA 4.0
2022-08-05T21:05:02.917Z
Right under the introduction paragraph is a section on authentication: https://bcoin.io/api-docs/#authentication, did you try that?
Murch
CC BY-SA 4.0
2022-08-05T21:38:51.790Z
Yes @Murch, I've tried that. When I try connecting it asks for the user and password after replacing api-key. So I'm really confused!
Seth Harrington
<json-rpc><bcoin>
How do I set up credentials for bcoin's JSON RPC interface?
Seth Harrington
# How do I set up credentials for bcoin's JSON RPC interface?

(Asked by: username_0 on 2022-08-05)

I've recently been introduced to bcoin. In the documentation, it's stated that bcoin's RPC interface is similar to that of Bitcoin Core but after syncing my node, I can't find a way to set up a JSON RPC Server on Bcoin to communicate with my app. The documentation clearly does not specify any methods such as rpcuser, rpcbind, rpcpassword values. Is there a way to set this up with bcoin in the bcoin.conf file?

**Tags:** json-rpc, bcoin

> **Comments:**
> **username_1**: Right under the introduction paragraph is a section on authentication: https://bcoin.io/api-docs/#authentication, did you try that?  
> **username_0**: Yes @username_1, I've tried that. When I try connecting it asks for the user and password after replacing api-key. So I'm really confused!  

---

## 1 answers

### Answer by username_2 on 2022-08-05. Score: 1

See the configuration guide in the bcoin repo: <https://github.com/bcoin-org/bcoin/blob/master/docs/configuration.md>

bcoin uses an API key for authentication, without username.

Bcoin always runs with an RPC interface, whether or not an api key has been set.

If you have any more questions, join us on telegram: <https://t.me/bcoinorg>

Example:

```
# start the server
$ bcoin --network=regtest --daemon

# Make an rpc request
$ bcoin-cli --network=regtest rpc getinfo
{
  "version": "2.1.2",
  "protocolversion": 70015,
  "walletversion": 0,
  "balance": 0,
  "blocks": 0,
  "timeoffset": 0,
  "connections": 0,
  "proxy": "",
  "difficulty": 4.6565423739069247e-10,
  "testnet": true,
  "keypoololdest": 0,
  "keypoolsize": 0,
  "unlocked_until": 0,
  "paytxfee": 0.0002,
  "relayfee": 0.00001,
  "errors": ""
}

```

> **Comments:**
> **username_0**: Ok, let me try it out without an api-key.  

---

