Pular para o conteúdo principal

Sua primeira conexão começa aqui.

Crie uma integração com WhatsApp usando a biblioteca WPPConnect para Node.js. Siga os passos para instalar o pacote, conectar uma sessão e receber suas primeiras mensagens.

01. Instale a biblioteca​

Adicione WPPConnect ao seu projeto Node.js:

npm install @wppconnect-team/wppconnect

Confira os requisitos e a configuração do ambiente.

02. Conecte uma sessão​

Crie um cliente e escaneie o QR code exibido no terminal com sua conta do WhatsApp.

const wppconnect = require('@wppconnect-team/wppconnect');

wppconnect.create({ session: 'my-session' }).then((client) => {
client.onMessage((message) => {
if (message.body === 'ping') {
client.sendText(message.from, 'pong');
}
});
});

Aprenda a criar e configurar um cliente.

03. Crie seu fluxo​

Prefere uma API HTTP?

Use WPPConnect Server para integrar outras linguagens usando endpoints REST e webhooks.

Construa com a comunidade​

Tire dúvidas no Discord, acompanhe tutoriais no YouTube ou contribua no GitHub.

License​

Copyright 2021 WPPConnect Team

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.