GOWA - WhatsApp REST API with support for UI, Multi Account, Webhooks, and MCP, and Chatwoot. Built with Golang for efficient memory use.
Go botgogolanggolang-whatsappgolang-whatsapp-apirestrest-apiwhatsappwhatsapp-apiwhatsapp-api-gowhatsapp-multi-devicewhatsapp-web-multi-device
Request validation
Use validation.ValidateStructWithContext and wrap ozzo errors with
pkgError.ValidationError(err.Error()). Cross-field and format checks follow
struct validation before the usecase touches WhatsApp, storage, or media helpers.
send_validation.goowns phone, mention, file/URL, MIME, size, duration, and poll rules. Require international phone format; local08...fails.@everyonebypasses phone validation.- Enforce exactly one of file/URL for request types with that contract. Read size
limits from
config.WhatsappSettingMax*; keepreply_message_idoptional. chat_validation.goalso applies pagination defaults. Preserve that mutation when changing validators or their callers.group_validation.gouses whatsmeow participant action constants.- In
message_validation.goand other validators,validation.Requiredrejects plainfalse. Use a pointer or explicit check whenfalseis valid.
Tests are colocated and table-driven. Multipart fixtures can use multipart.FileHeader
with a Content-Type header. Cover the changed rule's accepted and rejected inputs.