Skip to content

getUserKey

getUserKey(source): string | undefined

Defined in: src/resources/webhook-helpers.ts:73

Returns a stable identifier for the user behind a message, status or contact. The business-scoped user ID (from_user_id, user_id, recipient_user_id) wins when present, then the phone-based ID (from, wa_id, recipient_id). Returns undefined when none is set.

UserKeySource

string | undefined

Independent open-source project. Not affiliated with, endorsed by or sponsored by Meta or WhatsApp. Released under the MIT licence. Source on GitHub.