Optionalagentverify app state MACs
provide an auth state object to maintain the auth state
OptionalautoAuto-refresh the username GraphQL query_ids from the repo's main branch
at socket creation (background, never throws, pinned IDs remain the
fallback). Manual usernameQueryIds overrides always win. Default: false.
override browser config
cached group metadata, use to prevent redundant requests to WA & speed up msg sending
Optionalcallcache to store call offers
Fails the connection if the socket times out in this interval
alphanumeric country code (USA -> US) for the number used
custom upload hosts to upload media to
Rate-limit repeated decrypt-failure log lines for a dead session so a broken
session cannot flood logs / exhaust the heap (see #2234). Pass an options
object to tune the window/budget, or false to restore unlimited logging.
Default: { windowMs: 60000, maxPerWindow: 5 }.
Optionalmax?: numbercap on tracked session keys before oldest is pruned (default 5000)
OptionalmaxPerWindow?: numberhow many failures to log per session key per window (default 5)
OptionalwindowMs?: numberlength of each counting window in ms (default 60000)
Default timeout for queries, undefined for no timeout
should events be emitted for actions done by this socket connection
Enable automatic session recreation for failed messages
Enable recent message caching for retry handling
Optionalfetchagent used for fetch requests -- uploading/downloading media
Should baileys fire init queries automatically, default true
generate a high quality link preview, entails uploading the jpegThumbnail to WA
fetch a message from your store implement this so that messages failed to send (solves the "this message can take a while" issue) can be retried
ping-pong interval for WS connection
width for link preview images
logger
marks the client as online whenever the socket successfully connects
max retry count
Optionalmediaprovide a cache to store media, so does not have to be re-uploaded
Optionalmobileshould baileys use the mobile api instead of the multi device api
Optionalmsgmap to store the retry counts for failed messages; used to determine whether to retry a message or not
options for HTTP fetch requests
Optionally patch the message before sending out
Optionalplaceholdercache to track placeholder resends
OptionalprintPrint pairing QRs to the terminal automatically on connection.update
(rendered with the built-in zero-dependency engine — see
renderQRToTerminal in Utils for manual/custom rendering).
OptionalpushInitial pushName carried in the registration ClientPayload (used by mock servers for deterministic phone assignment).
Optionalqrtime to wait for the generation of the next QR in ms
time to wait between sending new retry requests
OptionalsendAnti-ban outgoing pacing, applied transparently inside sendMessage():
a global messages/minute token bucket plus a minimum per-chat gap with
jitter. Off by default. Individual calls can bypass with
options.skipRateLimit. See createSendGuard().
Returns if a jid should be ignored, no event for that jid will be triggered. Messages from that jid will also not be decrypted
manage history processing with this control; by default will sync up everything
Should Baileys ask the phone for full history, will be received async
transaction capability options for SignalKeyStore
Optionaluserprovide a cache to store a user's device list
OptionalusernameOverride the captured GraphQL query_ids used by the username APIs (checkUsername/setUsername/...). WhatsApp rotates these server-side; a rotated id fails with "GraphQL server error: Bad Request" and can be hot-patched here without waiting for a package update. Keys: CHECK, CHECK_MULTI, SET, GET, GET_RECOMMENDATIONS, PIN_SET.
version to connect with
the WS url to connect to WA
proxy agent