简体   繁体   English

Iota iota.adapter.BadApiResponse:来自节点 Message=forbidden 的 403 响应

[英]Iota iota.adapter.BadApiResponse: 403 response from node Message=forbidden

I am attempting to connect to the one-click-tangle I have set up on WSL2 ubuntu locally.我正在尝试在本地连接到我在 WSL2 ubuntu 上设置的一键式缠结。 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'}}.但是,当我尝试在 http://localhost:14265 连接到自动生成的节点时,我收到一个错误和以下响应:iota.adapter.BadApiResponse: 403 response from node: {'error': {'code': '403','消息':'禁止,错误:代码 = 403,消息 = 禁止'}}。 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.我也用生成的种子尝试了上述方法。

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如果您想获取信息,go 的方式是在 http://localhost:14265/api/v1/info 处的 GET 请求:14265/api/v1/消息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM