Skip to content

Detect whether the connected WhatsApp account is Business or Personal in Baileys #2219

Description

@pratikshap31

Description

We need to determine whether a WhatsApp account connected via the Baileys library is a Business account or a Normal (personal) account at the time of connection.

This information is required so we can apply different feature sets and restrictions based on account type (e.g., catalogs, labels, broadcast, profile APIs, etc.).

Currently, when a user connects their WhatsApp number using QR / pairing code, Baileys establishes the session successfully, but it does not explicitly expose whether the account is a Business or Personal account.


Expected Behaviour

When a WhatsApp number is connected:

  • The system should be able to identify:

    • isBusinessAccount = true | false
  • This information should be available immediately after successful connection.


Questions to Address

  1. Does Baileys expose any field, event, or socket response that indicates:

    • Business account
    • Verified business
    • WhatsApp Business profile
  2. Are these values available in:

    • conn.user
    • conn.on("creds.update")
    • conn.on("connection.update")
    • conn.on("contacts.upsert")
    • Or any profilePictureUrl, businessProfile, or metadata API
  3. If Baileys does not expose this directly:

    • Is there any way to fetch it via:

      • getBusinessProfile(jid)
      • fetchBlocklist
      • onWhatsApp
      • getProfile or similar internal methods?

Acceptance Criteria

  • On successful WhatsApp connection, system should:

    • Reliably detect if the account is Business or Personal
    • Store this value in DB
    • Make it available for feature-gating

Notes

This is critical for:

  • Enabling business-only features (catalogs, labels, automation, broadcast, etc.)
  • Preventing unsupported features on personal accounts

We need a definitive, programmatic way to identify account type using Baileys.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions