close
Skip to content

tawk: audit vs current vendor docs (2026-04-16) #93

@productdevbook

Description

@productdevbook

Summary

Wrapper exposes a small slice of Tawk_API and declares 15 hook fields it never bridges to consumers; several documented methods (popup/toggle/getStatus/isChat*/addTags/login) and config-time fields (visitor preload, customStyle.zIndex, autoStart, onBeforeLoad) are missing, and the bridged onUnreadCountChanged callback is not present in current public docs.

Gaps found

Missing API surface

Events not bridged

  • Generic public on(event, handler) / off(event, handler) subscription wrapping the 15 declared Tawk hooks; today consumers cannot subscribe to anything except unread count — https://developer.tawk.to/jsapi/
  • onBeforeLoad — not declared in the wrapper's TawkAPI interface at all — https://developer.tawk.to/jsapi/
  • onPrechatSubmit(data) — pre-chat form payload, not declared — https://developer.tawk.to/jsapi/
  • onOfflineSubmit(data) — offline form payload, not declared — https://developer.tawk.to/jsapi/
  • onStatusChange / onChatMaximized / onChatMinimized / onChatHidden / onChatStarted / onChatEnded / onChatMessageVisitor / onChatMessageAgent / onChatMessageSystem / onAgentJoinChat / onAgentLeaveChat / onChatSatisfaction / onVisitorNameChanged / onFileUpload / onTagsUpdated — declared on the interface, never bridged to a public listener API — https://developer.tawk.to/jsapi/

Config options not exposed

Auth modes

  • login({ hash, userId, name, email, phone }) is the documented authenticated path and restores past conversations; wrapper currently routes everything through setAttributes({ hash }) and never calls login()/logout()https://developer.tawk.to/jsapi/

Deprecations in our current code

  • onUnreadCountChanged — bridged by onUnreadCountChange() but absent from current developer.tawk.to/jsapi/ callback list; verify it still fires or mark as undocumented/legacy — https://developer.tawk.to/jsapi/
  • Tawk_API.shutdown() exists in vendor docs (disconnects socket) but wrapper's shutdown() calls endChat() instead; consider also calling vendor Tawk_API.shutdown() for full socket teardown — https://developer.tawk.to/jsapi/

Intentionally out of scope

  • Customization API beyond customStyle.zIndex (no customTabs, no background/position fields documented in current public JS API).
  • REST/admin APIs.
  • Pop-out window callback limitations (vendor note: "Pop-out chat windows do not support most event callbacks").

Sources

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions