From 844de431a30f39d4b160c9fac8b6efd6677f9034 Mon Sep 17 00:00:00 2001 From: SamuelScheit Date: Fri, 26 May 2023 14:13:12 +0200 Subject: [PATCH] feat: add native mobile api docs --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a5a8821..42eebe1 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,9 @@ import makeWASocket from '@whiskeysockets/baileys' TODO -## Connecting +## Connecting multi device (recommended) + +WhatsApp provides a multi-device API that allows Baileys to be authenticated as a second WhatsApp client by scanning a QR code with WhatsApp on your phone. ``` ts import makeWASocket, { DisconnectReason } from '@whiskeysockets/baileys' @@ -83,6 +85,12 @@ If the connection is successful, you will see a QR code printed on your terminal **Note:** the code to support the legacy version of WA Web (pre multi-device) has been removed in v5. Only the standard multi-device connection is now supported. This is done as WA seems to have completely dropped support for the legacy version. +## Connecting native mobile api + +Baileys also supports the native mobile API, which allows users to authenticate as a standalone WhatsApp client using their phone number. + +Run the [example](Example/example.ts) file with ``--mobile`` cli flag to use the native mobile API. + ## Configuring the Connection You can configure the connection by passing a `SocketConfig` object.