工作原理
自带账户
每个渠道都使用您品牌自己的提供商帐户 - 元 WhatsApp 企业帐户、LINE 官方帐户或经过 Google 验证的 RBM 代理。在您连接之前,该通道将保持关闭状态;在此之前没有发送任何内容。
一次发送瀑布流
没有单独的“发送 WhatsApp” API。每个渠道都与电子邮件、短信和推送通知在同一营销活动/自动化引擎中运行——共享一个频率上限,并自动回退到下一个渠道(电子邮件始终有效)。
发送时强制执行同意
在发送时,系统会检查每个渠道(marketing_whatsapp / marketing_line / marketing_rcs)的营销许可。未获得授权的会员将被跳过,不会收到邮件。
秘密已加密
访问令牌、通道密钥和服务帐户密钥在静态存储时均经过加密,且 API 绝不会返回。您只需在“设置”→“通道”中粘贴一次即可。
连接您的 Meta WhatsApp 企业账号。企业发起的消息将使用 Meta 批准的模板。
// WhatsApp — Meta WhatsApp Cloud API (Settings → Channels → WhatsApp)
// • Phone number id — from your WhatsApp Business Account (WABA)
// • Access token — WABA access token (write-only, encrypted at rest)
// • Templates — business-initiated messages use Meta-APPROVED templates
//
// Addressed by the member's phone number. Off until enabled; once on, WhatsApp joins
// the send waterfall. Meta business verification happens on Meta's side before delivery.LINE
连接 LINE 官方账号。会员可通过以下方式联系: LINE userId — 通过后续 webhook(签名验证)或一键式门户 Connect 捕获 LINE参见 会员门户嵌入 门户流程所依赖的已登录用户会话指南。
// LINE — Messaging API (Settings → Channels → LINE)
// • Channel access token — long-lived token (write-only, encrypted)
// • Channel secret — OPTIONAL, only to receive follow/unfollow events (below)
// • LINE Login channel — OPTIONAL, powers one-tap portal "Connect LINE"
//
// LINE is addressed by the member's LINE userId — captured two ways:
//
// 1) Follow webhook. Point your LINE Official Account's webhook at:
// POST https://flash.socialhub.ai/api/webhooks/line/{teamId}
// Flash verifies the x-line-signature header before acting:
// signature == base64( HMAC-SHA256( rawRequestBody, <channel secret> ) )
// follow -> the member's LINE userId is (re)linked
// unfollow-> Flash stops targeting them on LINE
// (Always returns 200 so LINE keeps the endpoint enabled.)
//
// 2) One-tap portal Connect LINE (needs the LINE Login channel). The member taps
// "Connect LINE" on their portal privacy page and authorizes via LINE Login;
// Flash links their LINE account to their membership automatically.RCS
连接经 Google 验证的 RBM 代理和服务帐户。Flash 在发送时,在服务器端将服务帐户密钥交换为 OAuth2 令牌。
// RCS — Google RCS Business Messaging / RBM (Settings → Channels → RCS)
// • RBM agent id — your Google-VERIFIED RBM agent (the sender)
// • Service-account email — the SA that calls the RBM API
// • Service-account key (PEM)— write-only, encrypted; exchanged for an OAuth2 token
// server-side at send time
//
// Addressed by E.164 phone (like SMS/WhatsApp). Reaches RCS-capable Android handsets;
// falls back automatically when a recipient can't receive RCS. Google verifies the
// RBM agent on Google's side before delivery is live.实用信息
- 每个渠道均独立于工作区,且默认关闭——未连接帐户的工作区将保持优先使用电子邮件的路径,行为不变。
- 您无需为每个渠道单独调用“发送”端点:只需创建一次营销活动或自动化流程,渠道计划就会根据每位会员选择合适的渠道,并在必要时使用电子邮件。
- WhatsApp RCS 可通过电话联系; LINE 由成员 LINE userId (通过 webhook 或门户连接) LINE).
- 供应商入驻/验证(元业务验证、LINE OA 设置、Google RBM 代理验证)在供应商端进行——Flash 持有凭证并强制执行同意,但无法绕过供应商的审批流程。