Interface: ClientOptions
Defined in: client/options.ts:8
Properties
authStrategy?
optionalauthStrategy?:AuthStrategy
Defined in: client/options.ts:10
Auth/persistence strategy. Defaults to LocalAuth in .whatsweb_auth.
autoReconnect?
optionalautoReconnect?:boolean
Defined in: client/options.ts:22
Automatically reconnect if the connection drops. Defaults to true.
commandPrefix?
optionalcommandPrefix?:string|string[]
Defined in: client/options.ts:40
Command prefix(es) for the router. Defaults to ['!', '/'].
deviceName?
optionaldeviceName?:string
Defined in: client/options.ts:30
Device name shown in "Linked devices". Defaults to whatsweb.
history?
optionalhistory?:false| {limit?:number;maxChats?:number; }
Defined in: client/options.ts:50
In-memory per-chat message history (used by conversation.history()).
Defaults to { limit: 50, maxChats: 1000 }. Set to false to disable.
logger?
optionallogger?:Logger
Defined in: client/options.ts:52
Pino (or compatible) logger. Silent by default.
markOnlineOnConnect?
optionalmarkOnlineOnConnect?:boolean
Defined in: client/options.ts:32
Mark the account as "online" on connect. Defaults to false.
maxReconnectAttempts?
optionalmaxReconnectAttempts?:number
Defined in: client/options.ts:24
Max reconnection attempts before giving up. Defaults to Infinity.
pairingCode?
optionalpairingCode?:string
Defined in: client/options.ts:20
Phone number (E.164, with or without +) to link via pairing code
instead of QR. Ideal when you can't scan a QR.
printQRInTerminal?
optionalprintQRInTerminal?:boolean
Defined in: client/options.ts:28
Print the QR / code to the terminal automatically. Defaults to true.
rateLimitMs?
optionalrateLimitMs?:number
Defined in: client/options.ts:38
Minimum milliseconds between outgoing messages. When set, all sends go
through a serial queue spaced by this interval, reducing ban risk.
Defaults to undefined (send immediately).
reconnectDelayMs?
optionalreconnectDelayMs?:number
Defined in: client/options.ts:26
Base delay (ms) for the exponential reconnection backoff. Defaults to 1000.
session?
optionalsession?:string
Defined in: client/options.ts:15
Shortcut: session name. Stored in .whatsweb_auth/<session>.
Handy for keeping several accounts. For full control, pass authStrategy.
stateStore?
optionalstateStore?:StateStore
Defined in: client/options.ts:45
Per-chat conversation state store. Defaults to an in-memory store;
implement StateStore to back it with Redis, a database, etc.