Skip to Content
WhatsApp MCPAPI Reference (generated)AuthOwnerFunctionsGetOwnerClientId

whatsapp-mcp


whatsapp-mcp / auth/owner / getOwnerClientId

Function: getOwnerClientId()

function getOwnerClientId(): Promise<string>;

Defined in: src/auth/owner.ts:35 

Resolve the owner client id.

Resolution order:

  1. If LOCAL_OWNER_CLIENT_ID is set in env, use that. This is the path after pnpm seed:owner printed the UUID and the operator pasted it into .env.
  2. Otherwise, fall back to a DB lookup for the row where is_owner=true. The result is cached in-process so we don’t re-query on every tool call.

Returns

Promise<string>

Throws

if no owner row exists. This is a startup-class misconfiguration and should crash the process; the tool layer surfaces a 500-class error to the caller.