WeChat.BatchSends (wechat v0.1.0)

消息管理 - 群发接口和原创效验

官方文档

Link to this section Summary

Types

消息发送任务的ID

Functions

根据OpenID列表群发【订阅号不可用,服务号认证后可用】 - 官方文档

根据标签进行群发【订阅号与服务号认证后均可用】 - 官方文档

删除群发【订阅号与服务号认证后均可用】 - 官方文档

查询群发消息发送状态【订阅号与服务号认证后均可用】 - 官方文档

群发速度 - 获取 - 官方文档

预览接口【订阅号与服务号认证后均可用】 - 官方文档

群发速度 - 设置 - 官方文档

Link to this section Types

Specs

msg_id() :: String.t()

消息发送任务的ID

Link to this section Functions

Link to this function

batch_send_by_list(client, body)

Specs

batch_send_by_list(WeChat.client(), body :: map()) :: WeChat.response()

根据OpenID列表群发【订阅号不可用,服务号认证后可用】 - 官方文档

Link to this function

batch_send_by_tag(client, body)

Specs

batch_send_by_tag(WeChat.client(), body :: map()) :: WeChat.response()

根据标签进行群发【订阅号与服务号认证后均可用】 - 官方文档

Link to this function

delete(client, msg_id, article_idx \\ 0)

Specs

delete(WeChat.client(), msg_id(), article_idx :: integer()) :: WeChat.response()

删除群发【订阅号与服务号认证后均可用】 - 官方文档

群发之后,随时可以通过该接口删除群发。

请注意

  1. 只有已经发送成功的消息才能删除
  2. 删除消息是将消息的图文详情页失效,已经收到的用户,还是能在其本地看到消息卡片。
  3. 删除群发消息只能删除图文消息和视频消息,其他类型的消息一经发送,无法删除。
  4. 如果多次群发发送的是一个图文消息,那么删除其中一次群发,就会删除掉这个图文消息也,导致所有群发都失效
Link to this function

get(client, msg_id)

Specs

查询群发消息发送状态【订阅号与服务号认证后均可用】 - 官方文档

开发者可通过该接口发送消息给指定用户,在手机端查看消息的样式和排版。

为了满足第三方平台开发者的需求,在保留对openID预览能力的同时,增加了对指定微信号发送预览的能力,但该能力每日调用次数有限制(100次),请勿滥用。

Link to this function

get_speed(client)

Specs

get_speed(WeChat.client()) :: WeChat.response()

群发速度 - 获取 - 官方文档

Link to this function

preview(client, body)

Specs

preview(WeChat.client(), body :: map()) :: WeChat.response()

预览接口【订阅号与服务号认证后均可用】 - 官方文档

开发者可通过该接口发送消息给指定用户,在手机端查看消息的样式和排版。

为了满足第三方平台开发者的需求,在保留对openID预览能力的同时,增加了对指定微信号发送预览的能力,但该能力每日调用次数有限制(100次),请勿滥用。

Link to this function

set_speed(client, speed)

Specs

set_speed(WeChat.client(), speed :: integer()) :: WeChat.response()

群发速度 - 设置 - 官方文档

群发速度的级别,是一个0到4的整数,数字越大表示群发速度越慢。

speed 与 realspeed 的关系如下:

speedrealspeed
080w/分钟
160w/分钟
245w/分钟
330w/分钟
410w/分钟