登录开始免费试用
easyCoexistence 官方 API

面向 SaaS 的统一社交媒体 API:一次集成 WhatsApp、Instagram、Facebook、TikTok、YouTube、LinkedIn 等更多渠道

easyCoexistence 的 Partner API 让 SaaS 只需一次集成,即可接入客户的 WhatsApp、Instagram、Facebook、TikTok、YouTube、LinkedIn 等更多渠道。一个 API 密钥和一次连接会话调用即可完成连接;同一组调用可列出这些账户、返回最新凭证、设置 Webhook 并接收带签名的状态事件;一个 posts 端点即可发布到 Instagram、Facebook、TikTok 和 LinkedIn。回复则通过各网络自身的 API,使用客户的访问令牌完成。

1 key

每个 easyCoexistence 账户拥有各自的 Partner API 密钥;该账户所连接的每个号码和社交账户都归属于此账户。

US$ 9 to US$ 0.75

每个连接每月的价格相同,无论是 WhatsApp 号码还是社交账户,连接数越多单价越低。

100 posts

通过 API 发布的帖子:Instagram 账户在滚动的 24 小时内可发布的数量有上限;轮播图计为一条。

15 a day

TikTok 通过其 API 为每个账户发布的视频帖子,发布速率不超过每分钟 6 条。

24 hours

用户发送消息后,WhatsApp 的客服窗口会开启;窗口关闭后,只能发送已获批准的模板消息。

一次集成涵盖哪些内容?

各网络相同的工作,通过 https://easycoexistence.com/api/v1 和一个 ec_live_ 密钥完成。您的代码只需学习一次这些调用,客户的 TikTok 账户与其 Instagram 账户的处理方式一致,使用相同的错误、相同的 ID 和相同的带签名事件:

ConnectPOST /connect-sessions, with channel set to the network
ListGET /connections for numbers, GET /channels for social accounts
Credentials?credentials=1 on either, with tokens renewed for you
WebhooksPUT /connections/{id}/webhook or PUT /channels/{id}/webhook
Status eventsconnection.* and channel.*, signed, with your external_ref
PostsPOST /channels/{id}/posts, now or at publish_at
RemoveDELETE on the connection or the channel

各网络仍需决定什么?

其 API 允许的内容。easyCoexistence 以相同方式连接、续期和监控每个账户,而您的产品能提供的功能则遵循各网络自身的规则,因此私信、评论事件和帖子类型在不同网络之间各不相同:

WhatsAppMessages and replies on the Cloud API, templates outside the 24-hour window
InstagramPosts, carousels, Reels and Stories; comments; replies to DMs
FacebookPage posts; comments; replies to Messenger DMs
TikTokVideo and photo posts; public replies to comments; no DMs
YouTubeUploads and comments through YouTube's own API; no DMs
LinkedInPosts a person approves, text with an image or a link; no DMs

为什么号码和社交账户是独立的资源?

因为它们承载的内容不同。号码对应一部手机、一个 WhatsApp Business Account 以及 Meta 的质量评级;社交账户对应一个账号名和一个网络 ID。因此,号码位于 /connections,社交账户位于 /channels,各自拥有独立的 ID、独立的重定向参数(connection_id 或 channel_id)以及独立的事件名称。仅使用 WhatsApp 的集成在未主动请求时不会接触到渠道,而连接是两者共用的唯一调用。

一次 posts 端点调用如何跨网络工作?

请求体在所有网络中保持一致:text、media、link 和 publish_at,外加个别网络会读取的少量字段,例如 Instagram 上的 ig_type,TikTok 上的 title 和 disable_comment,以及 LinkedIn 上的 image_alt。帖子进入队列前,会检查各网络的限制:

  • Instagram:一张图片或一个视频,或 2 至 10 项的轮播图;仅限 JPEG 图片;无 link 字段;正文最多 2,200 个字符。
  • Facebook:文本、一个链接、一张图片或一个视频;正文最多 63,206 个字符。
  • TikTok:一个视频,或 1 至 35 张 JPEG 或 WebP 图片的图文帖;无 link 字段;正文最多 2,200 个字符。
  • LinkedIn:文本加一张图片或一个链接,其中链接需要 title;不支持视频;正文最多 3,000 个字符。

easyCoexistence 是否位于您的代码与各网络之间?

仅在能为您节省工作时介入:连接、续期访问令牌、转发评论和私信事件,以及运行帖子队列。回复、读取及其他操作则由您的后端直接使用客户的访问令牌调用各网络的 API,Meta 也会将号码的消息直接投递到您的服务器。网络新增的功能,一旦该网络发布,您的代码即可调用,无需等待封装层。

新网络加入时会发生什么?

它会以新的 channel 值出现在相同的调用中。您的连接会话会指定该网络,其账户会出现在 GET /channels 中,其事件使用 channel.* 命名,每个账户的费用与任何其他连接相同。您的账户暂时无法使用的渠道会返回 400 channel_unavailable,消息中会列出对该账户开放的渠道。

设置方法

  1. Create a keyIn the dashboard under Profile, Developers, create the ec_live_ key and store it in your backend's secrets.
  2. Save a cardAdd a card to the account, since connect sessions answer 402 billing_required until one is saved.
  3. Connect each customerCreate a connect session with the channel and your customer's id as external_ref, and send the customer to its url.
  4. Set the webhooksGive each number a webhook_url and each social account a destination with PUT /channels/{id}/webhook.
  5. Post and replyPublish with POST /channels/{id}/posts and reply through each network's API with fresh credentials.

常见错误

  • 为 TikTok、YouTube 或 LinkedIn 开发私信功能。这些连接没有私信,因此应在这些渠道规划评论回复,而 WhatsApp、Instagram 和 Messenger 则规划私信回复。
  • 发送 Instagram 帖子时未附带媒体。Instagram 需要图片或视频,否则请求会在进入队列前被拒绝,因此请按网络分别附加媒体。
  • 将 channel_id 和 connection_id 存入同一列而不标明类型。它们是拥有独立 ID 的不同资源,因此请记录每个值属于哪一种。
  • 未经人工审核即从自动化流程向 LinkedIn 发布。LinkedIn 的 API 条款限制自动发布,因此请先由人工批准每一篇 LinkedIn 帖子。
使用 EasyCoexistence 完成这些操作

easyCoexistence 为您的 SaaS 提供一次集成,即可接入客户的 WhatsApp 号码,以及他们的 Instagram、Facebook、TikTok、YouTube 和 LinkedIn 账户,以及更多渠道:连接链接、凭证、Webhook、状态事件和帖子均通过各网络的官方 API 完成,每个连接全天候监控。每个连接每月 US$ 9 降至 US$ 0.75,连接越多单价越低,前 3 天免费试用。

常见问题

一个端点能否接收所有网络的事件?

可以。将每个渠道的目标地址指向同一个 URL,并根据请求体中的 platform 和 account_id 进行路由。WhatsApp 号码的消息由 Meta 发送至其自己的 webhook_url,该地址可以与其他网络相同,指向同一台服务器。

我需要自己在 Meta、TikTok、Google 和 LinkedIn 注册应用吗?

不需要。客户通过 easyCoexistence 在这些网络上的应用登录,您的后端会获得调用各网络 API 所需的访问令牌。

posts 端点会发布到哪些网络?

Instagram、Facebook 主页、TikTok 和 LinkedIn。YouTube 视频通过 YouTube 自身的 API,并使用该渠道的凭证上传。

easyCoexistence 的统一 API 收费多少?

各网络收费相同:每个连接每月 US$ 9 降至 US$ 0.75,具体单价由您的连接总数所在档位决定,前 3 天免费试用。

继续阅读

两分钟连接您的第一个渠道。

无需等待平台审核。连接 WhatsApp、Instagram、TikTok 或其他渠道,然后让您的 AI 发布、回复或生成报告,看它如何运作。

  • 免费试用 3 天
  • 随时取消
  • 仅使用官方 API
  • 全天候 24/7 监控

验证时间