PageSourceSearch

https://www.pushplus.plus/doc/assets/more.html-zO462c6c.js

js pushplus.plus collected 2026-10-01 13:54:45 UTC 10,532 bytes, 9 lines download raw bytes

1import{_ as p,c as u,b as t,a as e,d as s,e as i,w as l,r as d,o}from"./app-DRirxyIy.js";const r={};function m(h,a){const n=d("RouteLink");return o(),u("div",null,[a[20]||(a[20]=t('<h1 id="一对多消息使用说明" tabindex="-1"><a class="header-anchor" href="#一对多消息使用说明"><span>一对多消息使用说明</span></a></h1><h2 id="引言" tabindex="-1"><a class="header-anchor" href="#引言"><span>引言</span></a></h2><p>  pushplus 推送加可以使用一对多消息支持将一个消息发送给多个用户,需要先让用户加入到创建好的群组中。然后在发送消息接口上对一个topic参数,发送的消息将会推送到群组中所有的用户。如发送邮件、短信渠道的消息,需要群组中的用户自己先绑定好邮件、手机号,未绑定的用户将无法接收到消息。</p><h2 id="创建群组" tabindex="-1"><a class="header-anchor" href="#创建群组"><span>创建群组</span></a></h2><p>   可以在pushplus官网上点击“发送消息”-&gt;“一对多消息”进入功能页面。在“创建的群组”标签下点击“新建群组”,填写群组的相关信息。注意尽可能的将群组中的内容描述清晰方便加入的用户查看。</p><p><a data-fancybox title="" href="//image.pushplus.plus/doc/img/topic/add.png"><img src="//image.pushplus.plus/doc/img/topic/add.png" alt=""></a></p><p>具体新增群组字段说明:</p><ul><li>群组类型:普通群组的话仅订阅群组的用户才能查看群组介绍。使用公开群组可以方便传播分享,未订阅的用户也能查看内容,从而方便加入。</li><li>群组编码:用于发送消息的编码,自己随便定义。</li><li>群组名称:方便自己和订阅用户来区分不同的群组,名称自己随便定义。</li><li>联系方式:方便订阅用户在有问题的时候可以找到联系人来反馈问题。请留下自己真实的联系方式。</li><li>群组图标:用户自己上传,用于展示。</li><li>群组介绍:类似于电商产品的详情页,请尽可能的完善内容,图文结合。方便用户知道群组推送的内容是什么。</li></ul><h2 id="订阅群组" tabindex="-1"><a class="header-anchor" href="#订阅群组"><span>订阅群组</span></a></h2><p>新增群组后,点击“查看二维码”,可生成群组二维码。使用APP或微信扫码即可加入到群组中。生成二维码的时候,可以设置二维码的有效期天数和可扫码次数,可用来避免群组二维码泄漏。<br> 群组创建人可以管理订阅人,在订阅人列表中主动删除群组中的用户。同时加入群组的用户也可以主动退出群组。</p><p><a data-fancybox title="" href="//image.pushplus.plus/doc/img/topic/topicQrcode.png"><img src="//image.pushplus.plus/doc/img/topic/topicQrcode.png" alt=""></a></p><h2 id="发送消息的方式" tabindex="-1"><a class="header-anchor" href="#发送消息的方式"><span>发送消息的方式</span></a></h2><h3 id="一-网页上发送消息" tabindex="-1"><a class="header-anchor" href="#一-网页上发送消息"><span>一. 网页上发送消息</span></a></h3><p>   可以在pushplus官网上点击“发送消息”-&gt;“一对多消息”进入功能页面。在“试一试”中填入群组编码、消息标题和消息内容,点击“发送消息”按钮来发起一条推送请求。注意,推送请求成功并不代表就会推送消息,又可能因为配置或账号等原因不会真的发送消息。需要根据返回的消息流水号来查询消息的最终发送结果。当然如果您在pushplus公众号中接收到一条刚刚推送的消息内容,也就代表成功了!</p><p><a data-fancybox title="" href="//image.pushplus.plus/image/topic_message.png"><img src="//image.pushplus.plus/image/topic_message.png" alt=""></a></p><h3 id="二-使用api调用" tabindex="-1"><a class="header-anchor" href="#二-使用api调用"><span>二. 使用API调用</span></a></h3>',16)),e("p",null,[a[3]||(a[3]=s("   网页上只是测试验证,确保功能上是可用的。实际使用中还是需要通过接口来推送消息。推荐优先使用官方 ",-1)),i(n,{to:"/guide/sdk.html"},{default:l(()=>[...a[0]||(a[0]=[s("pushplus SDK",-1)])]),_:1}),a[4]||(a[4]=s(",而不是自行编写 HTTP 请求代码。SDK 已封装发送频率控制、开放接口令牌、回调等常见场景,可降低开发成本和出错概率。如需了解接口参数,可参考",-1)),i(n,{to:"/guide/api.html"},{default:l(()=>[...a[1]||(a[1]=[s("消息接口文档",-1)])]),_:1}),a[5]||(a[5]=s("中的说明。注意控制接口请求的频率和次数,避免给用户造成骚扰。具体的请求é
1™åˆ¶å‚考",-1)),i(n,{to:"/help/limit.html"},{default:l(()=>[...a[2]||(a[2]=[s("发送消息接口有什么限制吗?",-1)])]),_:1}),a[6]||(a[6]=s("。",-1))]),a[21]||(a[21]=t(`<h4 id="api调用示例" tabindex="-1"><a class="header-anchor" href="#api调用示例"><span>API调用示例</span></a></h4><ul><li>请求地址:https://www.pushplus.plus/send/</li><li>请求方式: POST</li><li>请求内容:</li></ul><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text"><pre><code class="language-text"><span class="line">{</span>
2<span class="line">    &quot;token&quot;:{token},</span>
3<span class="line">    &quot;title&quot;:&quot;标题&quot;,</span>
4<span class="line">    &quot;content&quot;:&quot;消息内容&quot;</span>
5<span class="line">    &quot;topic&quot;:{群组编码}</span>
6<span class="line">}</span>
7<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><ul><li>说明:具体使用的时候将请求内容中的{token}替换成自己的用户token或者消息token。{群组编码}替换成自定义的群组编码。</li></ul><p>   如果您是第三方开发者,也请注意下代码逻辑。</p>`,5)),e("ol",null,[a[9]||(a[9]=e("li",null,"发送消息接口是异步的,请勿直接根据同步返回的“请求成功”来认为消息就是发送成功了!而是根据同步返回的流水号来异步的查询最终消息结果。",-1)),e("li",null,[a[8]||(a[8]=s("根据返回码来判断是否继续发送消息,避免账号被封请异常情况的发生。具体可以参考:",-1)),i(n,{to:"/guide/code.html"},{default:l(()=>[...a[7]||(a[7]=[s("接口返回码说明",-1)])]),_:1})]),a[10]||(a[10]=e("li",null,"请控制接口请求的次数和频率。发送消息接口并不是可以无限调用的。",-1))]),a[22]||(a[22]=t(`<h3 id="三-使用第三方开发的工具" tabindex="-1"><a class="header-anchor" href="#三-使用第三方开发的工具"><span>三. 使用第三方开发的工具</span></a></h3><p>   除了自己开发,网上还有一些软件工具或者脚本已经集成了pushplus的发送消息功能,只需要配置自己的用户token或者消息token,无需关心具体的接口等信息,即可快捷的使用。对于这些第三方开发的工具,需要注意请求的频率控制,第三方开发者不一定很好的实现了判断逻辑来防止异常情况下消息频繁发送的情况,从而会出现账号被封,无法接收消息等情况。</p><p>   如果您使用了第三方工具,在使用过程中碰到了问题请与第三方开发者联系。</p><h3 id="四-使用邮件推送" tabindex="-1"><a class="header-anchor" href="#四-使用邮件推送"><span>四. 使用邮件推送</span></a></h3><p>   也可以不调用接口,直接向专属邮箱发送邮件来触发一对多推送。收件人固定为 token 邮箱,群组编码填写在抄送中(支持多个):</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text"><pre><code class="language-text"><span class="line">收件人:{token}@yp9.cn</span>
8<span class="line">抄送:{群组编码}@yp9.cn</span>
9<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div></div></div>`,6)),e("p",null,[a[12]||(a[12]=s("   例如群组编码为 ",-1)),a[13]||(a[13]=e("code",null,"mytopic",-1)),a[14]||(a[14]=s(" 时,抄送填写 ",-1)),a[15]||(a[15]=e("code",null,"[email protected]",-1)),a[16]||(a[16]=s("。将 ",-1)),a[17]||(a[17]=e("code",null,"{token}",-1)),a[18]||(a[18]=s(" 替换为你的用户令牌或消息令牌。邮件主题对应消息标题,邮件正文对应消息内容,发送渠道使用该令牌的默认渠道。更多说明见 ",-1)),i(n,{to:"/function/mail.html"},{default:l(()=>
9[...a[11]||(a[11]=[s("邮件推送使用说明",-1)])]),_:1}),a[19]||(a[19]=s("。",-1))])])}const b=p(r,[["render",m]]),c=JSON.parse('{"path":"/function/more.html","title":"一对多消息","lang":"zh-CN","frontmatter":{"title":"一对多消息"},"git":{"updatedTime":1786171641000,"contributors":[{"name":"陈大人","username":"","email":"[email protected]","commits":5},{"name":"陈思远","username":"","email":"[email protected]","commits":2}],"changelog":[{"hash":"7f8698e1d20a5b4aa79cf331c2cee7f6c1cfed4b","time":1786171641000,"email":"[email protected]","author":"陈大人","message":"邮件推送"},{"hash":"4e87b094da91f402ce9fb0cfbbc59c6283d5113c","time":1783413701000,"email":"[email protected]","author":"陈大人","message":"优化发布脚本"},{"hash":"efa1a8378142faab3f1c37f5d9d2fe5fd22ba71e","time":1782269989000,"email":"[email protected]","author":"陈大人","message":"优化描述"},{"hash":"c8091f4a4bdc520ed489355f824ac0b6e074a395","time":1782254771000,"email":"[email protected]","author":"陈大人","message":"图片修改"},{"hash":"2898fe9c73fcbdd36ff4bbb177936dfa16902256","time":1769477096000,"email":"[email protected]","author":"陈思远","message":"说明完善"},{"hash":"e7a2320dfe142d3fb2e435aaf2a5d0352e1561b9","time":1758765669000,"email":"[email protected]","author":"陈思远","message":"一对多消息"},{"hash":"ee294b50f1e7542bd75011f405b7104593e5258e","time":1683352968000,"email":"[email protected]","author":"陈大人","message":"功能说明"}]},"filePathRelative":"function/more.md"}');export{b as comp,c as data};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.