mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: add native mobile api docs
This commit is contained in:
10
README.md
10
README.md
@@ -42,7 +42,9 @@ import makeWASocket from '@whiskeysockets/baileys'
|
|||||||
|
|
||||||
TODO
|
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
|
``` ts
|
||||||
import makeWASocket, { DisconnectReason } from '@whiskeysockets/baileys'
|
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.
|
**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
|
## Configuring the Connection
|
||||||
|
|
||||||
You can configure the connection by passing a `SocketConfig` object.
|
You can configure the connection by passing a `SocketConfig` object.
|
||||||
|
|||||||
Reference in New Issue
Block a user