首页 > 解决方案 > Search.messages 帮助 Python SDK

问题描述

我正在尝试使用 Slack Python SDK 来搜索消息。我的电话看起来像这样:

result = CLIENT.api_call(
            api_method="search.messages",
            json={"query": search_phrase,
                  "count": limit,
                  "page": current_page,
                  "highlights": highlights
                  }
        )

但我的结果是:

The server responded with: {'ok': False, 'error': 'invalid_arguments', 'response_metadata': {'messages': ['[ERROR] missing required field: query']}}

如您所见,该调用确实包含“查询”参数。

任何帮助将不胜感激!

谢谢,

标签: pythonwebclientslack-api

解决方案


推荐阅读