Use Advanced Features

Copy Markdown View Source

Use this guide when you need surface area beyond text messages and basic groups: communities, newsletters, business helpers, app state sync, or WAM buffers.

Quick start

Fetch newsletter metadata from the top-level facade:

{:ok, metadata} =
  BaileysEx.newsletter_metadata(connection, :jid, "120363400000000000@newsletter")

Options

The public facade covers the common entry points:

When you need the full surface, call the feature modules directly with BaileysEx.queryable/1.

→ See Configuration Reference if you need runtime hooks such as custom history sync helpers.

Common patterns

Create and inspect a community

{:ok, community} =
  BaileysEx.community_create(connection, "Support Hub", "Company-wide support")

{:ok, metadata} = BaileysEx.community_metadata(connection, community.id)

Follow a newsletter

{:ok, _result} =
  BaileysEx.newsletter_follow(connection, "120363400000000000@newsletter")

Update business profile data

{:ok, _node} =
  BaileysEx.update_business_profile(connection, %{
    description: "Open weekdays",
    email: "support@example.com"
  })

Build and send a WAM buffer

wam =
  BaileysEx.WAM.new()
  |> BaileysEx.WAM.put_event(:WebcFingerprint, [{"sessionId", "demo"}])

{:ok, _node} = BaileysEx.send_wam_buffer(connection, wam)
{:ok, queryable} = BaileysEx.queryable(connection)
{:ok, linked} = BaileysEx.Feature.Community.fetch_linked_groups(queryable, "120363001234567890@g.us")

Limitations

  • The top-level facade only exposes the most common advanced helpers. Full community, newsletter, business, and app-state operations live in their public feature modules.
  • App-state sync is an advanced surface that assumes you reuse the running connection's credential store, Signal store, and event emitter.
  • WAM encoding exists for Baileys parity. It is not a general analytics system for your application.

See also: