Social Channel Integration & Staging Requirements

This guide outlines provider prerequisites, developer application setup, webhook callbacks, and staging verification for social messaging connectors in WonderCX (Facebook Messenger, Instagram, Telegram, LINE, and Microsoft Teams).


Ownership and approval gates

Assign a business owner, provider/app administrator, privacy/security reviewer and staging operator. One person may hold several roles, but record who approved each decision. The staging operator must have WonderCX permissions appropriate to the operation; provider ownership does not grant WonderCX access.

Workstream Required evidence Ready when
X private conversations App/project identity, exact permitted DM endpoints and intake mechanism, user-context authorization/scopes, quotas and approved spending The actual app can lawfully read its authorized conversations and send to explicitly authorized test recipients using the documented contract
LinkedIn private conversations Approved messaging product/partner program, written access confirmation, product-specific API/auth/callback documentation Approval explicitly covers the requested inbox/message operations, not just sign-in or social posting
Instagram original publishing Instagram Login professional account, applicable publishing permission/access level and account tasks, selected media types, approved hosting contract Both provider publishing access and public media disclosure are approved; a connector still needs implementation
Instagram/LINE outbound media Exact supported message types and provider fetch requirements, approved hosting contract and recipient disclosure The chosen media types can be fetched for the required lifetime without unsupported authentication or unsafe disclosure
Existing WonderCX connectors Staging identities, verified permissions, reachable authenticated callbacks and authorized recipients/public test surfaces Configuration is complete and the applicable staging cases below have recorded evidence

Approval is not implementation, and implementation is not live qualification. Generic Social records, a successful identity read, local listener health or a passing mocked test do not satisfy a live-delivery gate.

X access packet

The provider administrator must supply these nonsecret details:

  • Developer app/project IDs, owning account ID, permitted acting-user IDs and environment. Record whether the app may act for one account or multiple separately consenting accounts.
  • Links/version for the exact DM read, conversation, send and receipt/status contracts. Separate private messages from public posts/replies.
  • The supported user-context OAuth flow, exact requested/granted scopes, callback/redirect requirements, token expiry/refresh/revocation behavior and how the acting-user identity is verified. An app-only bearer token is not evidence of permission to act as a user.
  • The approved intake mechanism: signed account-activity/webhook subscriptions if available to that app, or an explicitly reviewed polling contract. Polling needs cursor persistence, replay/deduplication, backfill boundaries, expected latency and quota/cost limits; it is not a real-time webhook.
  • Signature/challenge/replay rules for callbacks, event schemas, stable message/conversation/participant IDs, ordering and duplicate-delivery behavior.
  • Current endpoint quotas, billing entitlement, approved spend ceiling and stop conditions. Do not buy credits or change a subscription without separate authorization. No historical X tier name or commercial-contract requirement is assumed.
  • Authorized test senders/recipients, account DM/privacy restrictions, permitted automation/use case and retention/deletion obligations.

For the first private-conversation implementation, explicitly review GET /2/dm_events and sending to an existing POST /2/dm_conversations/:dm_conversation_id/messages destination against the app's actual access. Current DM lookup documentation describes a 30-day event lookback, not unlimited inbox history. Define the initial cursor/backfill and outage-reconciliation policy accordingly. Current DM management documentation documents user-context authorization; confirm the exact grants and flow for every selected endpoint rather than assuming the app-only quickstart applies. Group DMs, unsolicited conversation creation and media are separate scope decisions, not implied by a one-to-one text contract.

Start with the official X API overview and the app's Developer Console. If a required endpoint or intake product is not available to the actual app, record Blocked; do not substitute scraping, browser-session cookies or fabricated webhook support.

LinkedIn access packet

Supply the approved product/program name, app/client ID, owning organization, access confirmation and a provider contact for contract questions. Obtain the actual approved product documentation, including:

  • Allowed conversation/message operations and actor/resource identifiers.
  • Exact API host, version headers, endpoint schemas and required OAuth grants.
  • Member versus organization authority, administrator tasks, recipient eligibility and any restrictions on storing or redisplaying message content.
  • Authorized callbacks/subscriptions, signature/challenge/replay requirements, or an explicitly permitted polling/reconciliation contract.
  • Token lifecycle, error/retry semantics, rate limits and retention/deletion requirements.

LinkedIn sign-in and w_member_social access do not establish a general private-inbox/messaging entitlement. Organization/community-management approval must likewise be checked against the exact requested operation. See Getting access to LinkedIn APIs. Do not guess private partner endpoints or use member passwords/session cookies. Without the messaging-specific contract, the DM connector stays unavailable.

Public media-hosting agreement

Choose a customer-approved service and obtain explicit authorization for disclosing the selected files to that service and the receiving provider. Hosting is not merely a technical URL dependency: anyone holding a public or signed download URL may be able to retrieve its content.

The agreement must answer all of these questions before an adapter is built:

Area Decision/evidence required
Ownership and processing Service owner, approved purpose, processing region, subprocessors, terms/DPA and permitted data classifications
Upload contract Exact HTTPS host/path, authentication mechanism, bounded upload size, accepted MIME types, object IDs and structured success/error responses
Provider fetch Approved download hosts, TLS behavior, GET/HEAD/range requirements, redirects, MIME/content length and whether an unauthenticated provider fetch can succeed
Access and isolation Private authenticated writes, non-enumerable object names, disabled listing, tenant/account isolation and revocation/deletion APIs
URL lifetime Minimum/maximum fetch lifetime, expiry behavior, asynchronous provider fetches, retry windows and recipient access after message acceptance
Original and preview media Provider-specific original/preview URLs, dimensions/encoding/duration requirements, metadata policy and approval of any transformations
Retention and deletion Origin/CDN/cache lifecycle, deletion verification, legal holds, backup copies and the limits of deleting copies already fetched by a provider
Reliability and cost Quotas, maximum bytes/concurrency, timeouts, idempotency, partial/orphan upload cleanup, monitoring owner and approved spending limits
Disclosure and evidence Public-exposure notice, who approves each upload/publication and which sanitized metadata may be retained as evidence

Use synthetic, nonconfidential fixtures for initial staging. Do not place customer transcripts, identity documents or attachments on an unapproved public bucket. Never send provider bearer tokens to a media CDN or disable TLS verification to make a fetch succeed.

Provider-specific boundaries:

  • Instagram original publishing: the current WonderCX account model uses Instagram Login. Confirm instagram_business_basic and instagram_business_content_publish, the applicable access level and any Page Publishing Authorization requirement. Do not mix Facebook Login tokens, hosts or permission names into this contract. Start with one agreed media type, such as a conforming JPEG; text-only Instagram publishing is not an equivalent of Facebook Page text publishing. A future implementation must track container creation, processing eligibility, publication and ambiguous outcomes separately. See Meta content publishing.
  • Instagram direct-message media: validate each selected type against the Instagram Login Send API. Hosting approval does not grant messaging access or remove reply-window restrictions. WonderCX currently enforces its documented standard 24-hour private reply window; do not assume an extension mentioned by a provider is implemented.
  • LINE media: image/video messages require original and preview URLs; audio has its own URL/duration requirements. Validate exact limits in the LINE message-type contracts. Do not promise a generic outbound PDF/file feature just because a hosting service accepts that file. A URL that expires immediately after API acceptance may break later recipient viewing; agree and test the required access window.

There are no current WonderCX media-host settings or X/LinkedIn credential fields to populate. The packet above is input for a reviewed implementation, not a new JSON configuration schema or permission to bypass disabled features.

Staging environment

Prepare an isolated WonderCX Server workspace with working OS-protected secret storage, correct time, supported SQLite storage and a compatible Client if client operation is in scope. Keep the Server awake throughout the test window. Use dedicated provider test accounts/numbers/Pages/groups and synthetic content; do not connect a production inbox for exploratory testing.

Record the exact WonderCX revision/build, OS, account UUIDs, provider IDs, API version, queue scopes and test window. For existing direct connectors:

  • An actual Administrator with queues.manage and channels.manage configures accounts in Settings > Direct messaging & social accounts.
  • Provider secrets are entered only through the masked configuration controls and remain in Server OS-encrypted storage. Do not paste secrets into chat, source files, this guide, an evidence worksheet or a portable backup.
  • Provide a trusted public HTTPS callback with the exact account path /channels/<account-UUID>, routed by a customer-owned reverse proxy to 127.0.0.1:8768. Preserve the raw body and signature headers. Do not expose the private RPC listener, disable certificate checks or forward all unrelated internet traffic to the application.
  • Register/verify the provider subscription separately. Account verification does not create it. For shared app/bot callbacks, review the required identity-aware fan-out; do not assume providers offer one webhook per account.
  • Use separate reviewed accounts for private DMs, each permitted group and public engagement. Record authorized participants and public test surfaces.
  • Grant only the needed app permissions and provider roles. For Facebook original text publishing, confirm pages_manage_posts and applicable Page tasks separately from comment-management access.

The callback path/port above describes implemented connectors only. A future X/LinkedIn product may require a different challenge or intake contract; do not point its callbacks at an unsupported account type.

Authorized test scope

Before live testing, record who approved:

  • Exact provider accounts, recipient/participant IDs, Page/post/comment/group destinations and the operations permitted on each.
  • Exact synthetic message/media corpus and any public exposure.
  • Maximum sends/posts/uploads, approved cost ceiling, test window and stop conditions. Do not use production customers as test recipients.
  • Negative tests that change permissions, revoke tokens or interrupt callbacks, restricted to disposable staging resources.
  • Provider-side cleanup and any deletion/cancellation actions. Local erasure is not authorization to delete a provider post.

Approval to prepare this guide is not approval to send a test message, publish a post, upload a file, create an account or buy API access.

Qualification cases and evidence

Run only applicable, implemented cases after explicit authorization. Mark unavailable features Blocked or Not applicable, with a reason, never Passed. Start with one account and one recipient, then expand within the approved budget.

Case Required observable result
Identity and callback Real provider identity matches the configured account; an authenticated real inbound reaches its scoped interaction
Callback authentication Controlled invalid/replayed/wrong-account events cannot create or retarget conversations; credentials are absent from logs
Private reply and receipt One approved reply uses the original account/thread; provider acceptance ID is recorded and recipient observation is separately documented; receipt behavior is claimed only where supported
Replay/restart Replayed events do not duplicate intake; a restart preserves account/thread identity and does not automatically resend uncertain work
Permissions and account changes Revoked role/scope, disabled source and stale revisions block the relevant save/dispatch without retargeting another account
Reply windows and consent Expired Meta windows block unsupported free text; a template uses the original account's approved catalog; START/STOP scope and late opt-out behavior remain intact
Supported media Approved MIME/size/caption boundaries are enforced, bytes reach the authorized recipient and download failures preserve text with a review warning
Reviewed groups Only the configured Telegram/LINE destination is ingested/replied to; individual authors remain distinct; membership is checked and forum/anonymous limitations remain explicit
Public engagement Two comments by one author remain separate; customer post/comment routes do not merge; replies target the exact original object and foreign/unavailable Page targets fail closed
Original Facebook text post Saving a draft creates no public post; exact-Page/content approval creates one provider post ID that is checked against Page activity
Cancellation/uncertainty Pre-submission cancellation blocks when possible; acceptance after cancellation stays recorded; uncertain publishing and HTTP 429 do not automatically retry
Campaigns Exact-account consent, recipient scope, current authority and whole-batch review are enforced; direct campaigns work without Twilio configuration
Recovery and privacy Disposable-workspace restore disables accounts and does not replay unresolved work; local publication erasure retains outcomes and older backups cannot resurrect erased text
Future hosted media Only after implementation: provider fetch, expiry, previews, deletion/cache limits and failed-upload cleanup match the approved hosting agreement
Future X/LinkedIn Only after implementation: actual authorized product operations, authenticated intake, identity isolation, quotas, revocation and ambiguity handling match the approved contract

Do not create an ambiguous live public-post result by blindly replaying POSTs or deliberately retrying a timeout. Use local controlled fault tests for destructive failure boundaries; any live fault injection needs its own approved plan and provider-side reconciliation before another attempt.

Keep evidence in a restricted location outside the repository. A safe record contains:

Run ID / UTC window:
Build revision / OS:
Provider / approved product / API version:
Business owner / provider administrator / staging operator:
Approval reference / authorized operations / count and spending limits:
WonderCX account UUID / queue scope:
Restricted reference to authorized provider resources and recipients:
Case ID / expected result / observed result:
Provider acceptance ID / separately observed receipt or Page activity:
Sanitized evidence reference / timestamp:
Result: Not run | Passed | Failed | Blocked | Not applicable
Failure or exclusion reason / owner / next decision:
Cleanup completed / remaining provider copies / retention deadline:
Reviewer / sign-off date:

Treat provider/recipient IDs as restricted metadata, even without message text. Do not retain tokens, cookies, app secrets, signed media URLs, unredacted payloads, authorization headers or customer content in this record.

Completion and handoff

Local regression coverage is a prerequisite, not a replacement for the live cases. Developers can use the existing commands without sending provider traffic:

npm run typecheck
npm run build
node --test test/channel-providers.test.mjs test/channel-transport.test.mjs test/channel-enterprise.test.mjs test/social-publication.test.mjs test/messaging-campaign.test.mjs test/privacy-erasure.test.mjs test/renderer-reliability.test.mjs

Provide a sanitized access/hosting packet and restricted evidence references to the implementer. Do not commit raw approval attachments or operational evidence. Ready-for-implementation means the relevant contract and disclosure decisions are resolved; ready-for-staging additionally requires the feature to exist, local checks to pass and a complete authorized test environment.

A staging sign-off lists the exact build, accounts, capabilities and cases that passed, remaining failures/exclusions and who accepts them. It does not grant universal provider coverage, production capacity certification or approval to publish future customer content. Stop on an identity mismatch, unintended public disclosure, duplicate send, credential exposure or unapproved spend; reconcile with the provider before resuming.