funnelchat20/wapi-gateway
Laravel/PHP package that provides a gateway to the WAPI WhatsApp API, helping you send messages, manage instances, handle webhooks, and centralize API configuration. It offers a simple, configurable interface for building WhatsApp automation and notifications in your applications.
composer require) and confirm which line you are on: ^0.22.4 remains the entry point for consumers such as accounts; 0.23.3 is the current patch. If you are jumping from 0.22.x, review the full changelog for 0.23.0–0.23.3 before bumping — the provided 0.23.3 note only lists the vCard fix.device_logs. Without that table the client still works, but you lose the observability that the 0.22.7 unsubscribe fix exists to provide.ZApiClient class (public methods such as unsubscribe(), logout(), logRequest(), sanitizeUrl()), ZApiLite (the thin variant that inherits the same behaviour), and your device_logs rows after issuing a single call.0.23.3 fixes duplicated country codes in shared-contact vCards, so this is the second surface to validate after upgrading.device_logs rows exist with method=unsubscribe — one with step=disconnect, one with step=cancel. That single check validates credentials, migration, logging parity and URL masking in one pass. If you use shared contacts, generate a vCard for a contact with an international number and confirm the country code appears once.device_logs as the source of truth for lifecycle state. The 0.22.7 change makes unsubscribe() log in parity with logout(), so cancellation is auditable end to end. Build any "is this instance really cancelled?" check against the log table rather than trusting the HTTP response you got back at call time.step distinguishes disconnect from cancel under the shared method=unsubscribe. Deduplicate on (instance_id, method, step) when counting cancellations, otherwise a single unsubscribe inflates your metrics by two.0.22.7 release was cut for. A paid instance with no successful method=unsubscribe row (both steps present) is the queue you want surfaced in a scheduled command or a Laravel notification, not a spreadsheet.logRequest() convention in your own wrappers. If you extend or decorate the client with custom endpoints, call logRequest() explicitly; the bug fixed in 0.22.7 was precisely a method that skipped it. Any new call site that omits it becomes invisible in the same way.failed() handling. Since both HTTP calls now log, a retried job leaves a readable trail of attempts; without the fix you would have had a silent gap.ZApiLite only where you deliberately want the reduced surface. Anything you write against ZApiClient should keep working through the inheritance path.0.22.x to 0.23.3 picks up both the unsubscribe logging fix and the shared-contact vCard fix, but a 0.22→0.23 minor jump in 0.x semver can carry more than a patch. Read the changelog and run an upgrade pass rather than treating it as a blind patch bump.0.22.7 logging fix is forward-looking only — unsubscribes that failed before it left no device_logs trace and cannot be backfilled. Run a one-off reconciliation against your payment provider for historical periods rather than querying logs./token/<token>/ and sanitizeUrl() redacts it, so never expect to recover an instance token or identify an instance from the logged URL. Key off whatever instance/device identifier column you store alongside the log entry.step values are lowercase literals (disconnect, cancel). Compare exactly and avoid case-insensitive matching that could hide a future value.0.22.7; on 0.22.7 and above it is. Make sure any alerting you build knows which version produced the data it is reading.disconnect may still be followed by an attempted cancel (or vice versa). Don't assume the two rows are written atomically or that one implies the other succeeded — check each step independently.device_logs migration ran, confirm the row is written (proves logRequest() was reached), then inspect the sanitized URL and response payload. If no row appears at all, you are on an older version or a custom wrapper that bypasses logging.logRequest() and sanitizeUrl() are the natural seams — override or hook them centrally (events, a decorator, or a base class) to add correlation IDs or extra redaction, rather than sprinkling logging through call sites.ZApiLite and ZApiClient in lockstep in your own abstractions. Behaviour added to the base client is inherited, so a wrapper that special-cases only ZApiClient will quietly diverge from lite consumers.device_logs or HTTP status. If shared contacts render malformed phone numbers, check the package version first; 0.23.3 prevents duplicated country codes, but it does not rewrite vCards that were already generated — regenerate them.0.23.x line from the 0.23.3 note. The release note lists only the shared-contact vCard fix. If you are upgrading from 0.22.x, validate both your unsubscribe logging path and your vCard path in a staging environment before rolling out.How can I help you explore Laravel packages today?