Reputation: 3
I am attempting to connect to the one-click-tangle I have set up on WSL2 ubuntu locally. However, when I try and connect to the automatically generated node at http://localhost:14265 I get an error and the following response: iota.adapter.BadApiResponse: 403 response from node: {'error': {'code': '403', 'message': 'Forbidden, error: code=403, message=Forbidden'}}. I'm guessing I'm missing something small.
from iota import Iota
from iota import ProposedTransaction
from iota import Address
from iota import TryteString
api = Iota('http://localhost:14265')
print(api.get_node_info())
I have also tried the above with a generated seed.
Upvotes: 0
Views: 176
Reputation: 11
Ok, I was struggling with this one for a while too. If you want to get info, the way to go is GET request at
http://localhost:14265/api/v1/info
If you want to send a message to the tangle, you want a POST request to
http://localhost:14265/api/v1/messages
Upvotes: 1