企业微信(WeCom)-连接微信 icon

企业微信(WeCom)-连接微信

企业微信连接微信功能 - 微信客服、客户联系、家校应用、政民沟通

Actions172

微信客服 → [会话与消息] 读取消息

AI-generated

Summary

Fetches recent customer-service messages and events for a WeCom客服 account, with cursor-based continuation for additional results. Optionally uses a callback token and adds parsed helper fields while retaining the original message fields.

Inputs

  • 客服账号 (open_kfid) (required) — Select the customer-service account whose messages to retrieve.
  • 游标 (cursor) — Pass the previous response’s next_cursor to continue fetching; leave blank for the first request. Persist it and check has_more to determine whether to fetch again.
  • Token (token) — Callback event token, valid for 10 minutes. If omitted, the API applies stricter rate limits.
  • 拉取条数 (limit) — Requested message count, from 1 to 1000; defaults to 1000. The response may contain fewer, so check has_more.
  • 语音格式 (voice_format) — Voice message format: AMR (0, default) or SILK (1).
  • 解析消息类型 (parse_message_types) — When enabled, adds parsed_content and event_type helper fields. Original message fields remain available.

Output shape

A single API response object containing the fetched messages and pagination data.

The API only provides messages and events from the most recent 3 days. Use next_cursor and has_more for pagination.

Links

Discussion