open-wa v5 is alpha. Use v4.76.0 for mature production systems unless you are validating v5.
The Client APIAPI ExplorerLicensing

Argument normalization

Positional vs object arguments, alias resolution, validation, and dispatch.

Argument normalization

Generated file warning: this page is generated by packages/schema/scripts/gen-client-reference-docs.ts. Do not edit generated method content by hand.

Every generated method accepts either positional arguments (mapped by parameterOrder) or a single options object (with key aliases resolved).

await client.sendText('447123456789@c.us', 'Hello, world!');
// positional args map by parameterOrder -> { to, content, options }

await client.sendText({ chatId: '447123456789@c.us', text: 'Hello, world!' });
// key aliases normalize -> { to, content }

Steps: 1) resolve positional/object args, 2) normalize key aliases, 3) inputSchema.parseAsync() validates, 4) dispatch to execute(...). Invalid input rejects before any WhatsApp call.

Wally the Walrus typing

Was this helpful?

Wally and his cute companion coffee mug are coding day and night to keep this up-to-date!

On this page