WhatsAppClientConfig
Defined in: src/index.ts:280
Configuration accepted by WhatsAppClient.
Properties
Section titled “Properties”accessToken
Section titled “accessToken”accessToken:
string
Defined in: src/index.ts:282
Permanent or temporary access token used to authenticate requests.
apiVersion?
Section titled “apiVersion?”
optionalapiVersion?:string
Defined in: src/index.ts:288
Graph API version, e.g. v26.0. Defaults to DEFAULT_API_VERSION.
baseUrl?
Section titled “baseUrl?”
optionalbaseUrl?:string
Defined in: src/index.ts:290
Base URL for the Graph API. Defaults to DEFAULT_BASE_URL.
businessAccountId?
Section titled “businessAccountId?”
optionalbusinessAccountId?:string
Defined in: src/index.ts:286
WhatsApp Business Account (WABA) ID.
maxRetries?
Section titled “maxRetries?”
optionalmaxRetries?:number
Defined in: src/index.ts:294
Maximum number of retries. Defaults to DEFAULT_MAX_RETRIES.
phoneNumberId?
Section titled “phoneNumberId?”
optionalphoneNumberId?:string
Defined in: src/index.ts:284
Phone number ID used as the sender for messaging endpoints.
retryMessageSends?
Section titled “retryMessageSends?”
optionalretryMessageSends?:boolean
Defined in: src/index.ts:306
Retry message sends on 5xx, network and timeout failures too. Defaults to
false: a POST to {phoneNumberId}/messages (sends, sendRaw, mark-as-read
and typing indicators) is retried on HTTP 429 only.
Meta documents no idempotency key for sends. A 5xx, timeout or dropped
connection can happen after Meta accepted the message, so with this set to
true a retry can deliver the same message twice. Enable it only if you
de-duplicate on your side. Requests aborted through a signal and responses
that cannot be parsed are never retried. Other requests keep the standard policy.
timeoutMs?
Section titled “timeoutMs?”
optionaltimeoutMs?:number
Defined in: src/index.ts:292
Per-attempt request timeout in ms. Defaults to DEFAULT_TIMEOUT_MS.
Independent open-source project. Not affiliated with, endorsed by or sponsored by Meta or WhatsApp. Released under the MIT licence. Source on GitHub.