multichain-node connection with front end

+2 votes
I am trying to call getinfo() method  and print the output on console using multichain-node npm..

I'get following output on console

 

undefined
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML>
<HEAD>
<TITLE>Error</TITLE>
<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=ISO-8859-1'>
</HEAD>
<BODY><H1>401 Unauthorized.</H1></BODY>
</HTML>

undefined

What could be the possible mistake?
asked Mar 8, 2019 by tk

1 Answer

+1 vote

If you set the RPC username and password correctly, the issue may be that you are trying to access the node API from a different computer. You can fix this using the rpcallowip runtime parameter:

https://www.multichain.com/qa/780/rpcallowip-to-give-access-to-clients?show=781#a781

answered Mar 8, 2019 by MultiChain
...