Skip to content
This repository has been archived by the owner on Oct 21, 2023. It is now read-only.

无效的动作请求参数:self_id require #43

Open
liaosunny123 opened this issue Jul 7, 2023 · 3 comments
Open

无效的动作请求参数:self_id require #43

liaosunny123 opened this issue Jul 7, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@liaosunny123
Copy link

{
    "action": "get_latest_events",
    "params": {
        "self": {
            "user_id":"28*****45",
            "platform":"qq"
        }
    }
}

以上请求信息有误吗?文档缺少最小示例,且在ob-v12标准中未提及self_id参数。
可是返回:

{
    "status": "failed",
    "retcode": 10003,
    "data": null,
    "message": "无效的动作请求参数:self_id required",
    "echo": null
}
@abrahum
Copy link
Collaborator

abrahum commented Jul 7, 2023

你应该是使用了多个机器人账号共享一个 OneBot Connect 连接功能吧,那样会需要额外传入一个 self 字段:https://12.onebot.dev/connect/data-protocol/action-request/

按照标准元动作,确实不应该要求该字段,这是一个 bug,目前可以通过传入一个 self 字段使用

@abrahum abrahum added the bug Something isn't working label Jul 7, 2023
@liaosunny123
Copy link
Author

感谢,已经正常工作了。
我建议更改这部分的提示,更改为"post参数",而非动作请求参数,后者可能是暗示"param"参数下的

@abrahum
Copy link
Collaborator

abrahum commented Jul 7, 2023

感谢,已经正常工作了。 我建议更改这部分的提示,更改为"post参数",而非动作请求参数,后者可能是暗示"param"参数下的

是的,报错信息也需要改进,感谢反馈

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants