Uau!Sandbox completo para desenvolvedores — grátis para sempre!Registre-se agora
Bot de WhatsApp em PHP

Como criar um bot de WhatsApp com PHP: Guia Passo a Passo

Updated on August 6, 2026

Este guia passo a passo da Whapi.Cloud explica como criar um bot de WhatsApp estável em PHP 8.x usando cURL nativo e POO moderna com Composer e Guzzle. Escrito para desenvolvedores PHP, este tutorial demonstra como contornar a verificação de empresa da Meta usando sockets de sessão web, configurar webhooks seguros com o Ngrok, implementar uma proteção contra loops para evitar respostas infinitas e automatizar grupos do WhatsApp com até 1024 membros sob uma assinatura de tarifa fixa.

PHP WhatsApp bot integration architecture diagram
Sobre o autor
Jason Mitchell
Jason Mitchell
Product Owner na Whapi.Cloud
Construindo integrações de WhatsApp desde 2019. Sempre aberto a conexões — seja para discutir um caso de uso da API, compartilhar feedback ou simplesmente trocar ideias. Me encontre no LinkedIn.
WhatsApp Bot FAQ

Common Questions about PHP WhatsApp Integration

Yes. The single-file native PHP approach has zero external dependencies and runs on standard PHP cURL libraries. This makes it completely compatible with shared cPanel hosting or standard VPS servers. Simply upload your script and point the Whapi.Cloud webhooks to its public URL.
Your bot has full access to native WhatsApp Group features, allowing you to create, manage, and send messages to groups containing up to 1024 members. Unlike Meta's official Cloud API, which severely restricts group sizes for typical business interactions, Whapi provides direct, unrestricted group automation.
Yes. Whapi.Cloud connects via web-session sockets, which mirror the behavior of WhatsApp Web. You can continue using the physical WhatsApp application on your mobile phone to read and write messages manually while your programmatic PHP bot operates in parallel on the same number.
No. Whapi.Cloud uses web-session sockets to pair your regular WhatsApp account (personal or business). This bypasses Facebook Business Manager verification, template approval queues, and per-message Meta fees entirely, allowing you to send organic, conversational text and media immediately.
The Developer Sandbox tier is permanent and completely free. It supports up to 5 active conversations per month, 150 messages per day, and 1,000 API requests per month. This lets you thoroughly test your bot's logic, endpoints, and webhooks before committing to a paid commercial subscription.

Veja o que Nossos Clientes Construíram
com Whapi.Cloud

"Cart reminders with a 5% follow-up coupon lifted our recovery rate from 4% to 11%. Customers reply directly in WhatsApp — our team closes the sale right there."

Abandoned Cart Recovery

Hans M., Germany
"Managing 40+ segment groups became trivial — auto welcome messages, pinned updates, inactive member cleanup. Lead gen from WhatsApp groups grew 3x in two months."

Automated Group Management at Scale

Carlos S., Brazil
"Guests receive door codes, WiFi credentials, and a local guide automatically on arrival. Checkout is confirmed via a photo on WhatsApp. Front desk load dropped 40% in the first month."

Contactless Hotel Operations

Ana M., Romania
"Our deals channel has 12,000 subscribers. Whapi.Cloud scrapes competitors, filters duplicates, and auto-posts the top 5 daily. Channel growth tripled after switching to automated posting."

Automated Deal Channel Publishing

Katrin S., Germany
"We verified 93,000 active WhatsApp numbers from 180,000 contacts in 48 hours. Campaign open rates improved significantly by stopping spend on inactive numbers."

Large-Scale Audience Filtering

Sergio N., Spain
"Patients book appointments and check lab results on WhatsApp. The bot handles 200+ daily queries without staff. Appointment no-shows dropped 30% after automated 24h reminders."

Healthcare Bot — Scheduling & Results

Dr. Fernanda O., Brazil
"Post-purchase WhatsApp messages with a tailored discount at day 14. Birthday coupons see 45% redemption — far above our email rate. Repeat purchases via WhatsApp: 18% of total revenue."

WhatsApp Retention Campaigns

Lukas W., Germany
"Customers get a WhatsApp tracking link the moment their parcel ships. Support tickets dropped 35% in 3 months — mostly 'where is my order?' queries simply disappeared."

Automated Shipping Notifications

Matei P., Romania
Desenvolvimento e gestão próprios

O que é Whapi.Cloud?

Whapi.Cloud é uma API intuitiva que conecta seu negócio ao WhatsApp de forma direta e sem complicações. Crie bots de suporte, agende compromissos, envie notificações, gerencie grupos e canais, automatize confirmações de pedidos e acompanhe tudo com webhooks. Foque no crescimento do seu negócio enquanto a API cuida da camada de mensagens.

Nosso serviço oferece controle total e gerenciamento de grupos, comunidades e canais do WhatsApp.

Adicione dinâmica e novos recursos: mídia, botões, reações, stories, pedidos e produtos. Tudo disponível para interação com seus clientes.

Nossa equipe responderá rapidamente e ajudará você com qualquer dúvida!
Account screenshot
Account screenshot