I have a private tangle with a Hornet Coordinator node. I am trying to make zero-value transactions using Python API but get an error "Command [attachToTangle] is protected.

This the code which I'm using for sending transactions.

API Declaration printing get_node_info() Creating and Sending Transaction Error Response config.json file

Please help someone. Any suggestions are appreciated.


The attachToTangle command is used to perform PoW for your transaction. For it to work for transactions received via the Internet (even from localhost), you need to enable remote PoW in your Hornet node:


by setting this configuration:

"httpAPI": {
    "permitRemoteAccess": [

Alternatively, you can set your PyOTA library to to local PoW:


  • It is still not working. I added "attachToTangle" in the permitRemoteAccess. I even tried to do local pow but it failed when I set the local_pow=True. Please let me know. Feb 5 at 17:43
  • Same error message as before? Probably you edited the wrong config file and/or forgot to restart your node?
    – mihi
    Feb 5 at 21:13
  • I edited the config.json file of the node in the /var/lib/hornet directory. After that, I restarted my node using sudo systemctl restart hornet. Is there any way by which I can share the screenshot of the edited file? Feb 6 at 1:25
  • you might edit your question and add the screenshots there. But no, I have no idea anymore why it does not work for you :-(
    – mihi
    Feb 6 at 12:27
  • I added the screenshot of the file. Please let me know if you know someone else who might help. Feb 6 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.