edupoli / MyZap2.0

API para integração do Whatsapp
93 stars 49 forks source link

Debian - MyZap2.0 - Post no endpoint /Start - Não recebe retorno #11

Open tessarolli opened 2 years ago

tessarolli commented 2 years ago

Olá, segui o tutorial de instalação Configurei Firebase Configurei .env com os dados do Firebase

Quando disparo um Post no endpoint /Start, tenho essa resposta em loop no servidor:

`root@assistentelegal:~/MyZap2.0# node index.js Unable to load the sleep module (no animations available)

Welcome to /\\ \\ /\\ /\\ /\\\\\\ /\\\ /\\\\\ \/\\ \ \ \\ \/\\ /\\ \//\\ /\\\\ \/\\/\\ \/\\ \\ \\ \/\\/\\ /\\ \/\\ \\ \/\\ \/\\ \/\\ \\ \\ \/\\ /\\ \/\\\\\ \/\\\\/ \/\\ \\ \\ \/\\ /\\ /\\////\\ \/\\/ \/\\ \\ \\ \/\\ /\\ \/\\ \/\\ \/\\ \/\\ \\ \\ \/\\ /\\\\\\ /\\ \/\\ \/\\ \// \// \// \// \/__/ \// \// \/_/ Http server running on 10.10.0.201:3333

info:


| | / / \/ \/ __/_ __ ___ __/ / | | /| / / // / // / / / \/ \/ \/ _ \/ _/ / | |/ |/ / __/ ___/ // // / / / / / / / / // / |/|// // _/____// /// //\/_/\/ info: [123456:browser] Initializing browser... info: [123456:client] Initializing... info: [123456:client] WhatsApp WEB version: undefined info: [123456:client] WhatsApp WEB version: undefined info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:session] Session Unpaired info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: undefined info: [123456:client] WhatsApp WEB version: undefined info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: 2.2126.14 info: [123456:client] WhatsApp WEB version: undefined info: [123456:client] WhatsApp WEB version: undefined ^Ccleanup `

/*##############################################################################

File: .env

Project: MyZap2.0

Created Date: 2021-06-21 12:52:13

Author: Eduardo Policarpo

Last Modified: 2021-06-21 12:59:26

Modified By: Eduardo Policarpo

##############################################################################*/

Defina o numero da porta a ser usada pela API.

PORT=3333

Defina o HOST aqui caso voce utilize uma VPS deve ser colocado o IP da VPS, ou caso vc tenha,

um nome de dominio ja apontado para sua VPS deve-se colocar o nome de dominio

Exemplos:

HOST=204.202.54.2 => IP da VPS

HOST=api.myzap.com.br => caso dominio apontado para VPS

HOST=localhost => caso esteja usando na sua proprima maquina local

HOST=10.10.0.201

ENGINE: setar o valor correspondente a ENGINE que deseja utilizar

1 - para WhatsApp-Web-JS / 2 - para WPPCONNECT / 3 - para VENOM

ENGINE=2

Caso utilize certificado SSL defina a variavel HTTPS=1 e informe o diretorio nas variaveis

HTTPS=0

SSL_KEY_PATH=/etc/letsencrypt/live/yourdomain.net/privkey.pem

SSL_CERT_PATH=/etc/letsencrypt/live/yourdomain.net/cert.pem

TOKEN => Aqui voce define uma chave de segurança para Uso da API,

só conseguira conectar e criar sessões informando o codigo definido Aqui

TOKEN=2022

firebase database config

Nesta sesão voce deve configurar os seus dados de autenticação da conta firebase

API_KEY= AUTH_DOMAIN=thetaapp-myzap.firebaseapp.com PROJECT_ID=thetaapp-myzap STORAGE_BUCKET=thetaapp-myzap.appspot.com MESSAGING_SENDER_ID= APP_ID=****

As Sessoes criadas na API são salvas no banco de dados GOOGLE firebase

Caso queira que ao iniciar a API todas as sessões salvas sejam inicializadas automaticamente

START_ALL_SESSIONS=true

Caso queira forçar a reconexão da API em caso de desconexão do WhatsApp defina true

FORCE_CONNECTION_USE_HERE=true

Sabe me dizer onde posso ter errado?

tessarolli commented 2 years ago

Estou usando essa requisição

curl --location --request POST '10.10.0.201:3333/start' \ --header 'Content-Type: application/json' \ --header 'apitoken: 2022' \ --data-raw '{ "session": "123456", "wh_status":"", "wh_message":"", "wh_qrcode":"", "wh_connect":"" }'

gildonei commented 5 months ago

Estou com o mesmo problema, quando enviado os dados pelo postman, usando https, o qrCode não renderiza

tessarolli commented 5 months ago

Da uma olhada em outro projeto, WppConnect e WppConnect-Server

Estou usando este último e funciona muito bem.

Em sex., 12 de jan. de 2024 15:59, Gildonei Mendes Anacleto Junior < @.***> escreveu:

Estou com o mesmo problema, quando enviado os dados pelo postman, usando https, o qrCode não renderiza

— Reply to this email directly, view it on GitHub https://github.com/edupoli/MyZap2.0/issues/11#issuecomment-1889802292, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYURAB7B4CAVSWLWRC2OA3YOGBXJAVCNFSM5STBW7L2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBYHE4DAMRSHEZA . You are receiving this because you authored the thread.Message ID: @.***>

gildonei commented 5 months ago

Opa o Connect server eu já instalei e rodei. Estava olhando um projeto da apibrasil para a parte de Front do usuário e eles tem opção de usar o wpp server ou Venom ou outro, porém fiquei travando em um ponto com o ssl e sockets

Sem ssl o sockets.io vai, já com o ssl não.

Em sex., 12 de jan. de 2024 16:57, Luiz Tessarolli @.***> escreveu:

Da uma olhada em outro projeto, WppConnect e WppConnect-Server

Estou usando este último e funciona muito bem.

Em sex., 12 de jan. de 2024 15:59, Gildonei Mendes Anacleto Junior < @.***> escreveu:

Estou com o mesmo problema, quando enviado os dados pelo postman, usando https, o qrCode não renderiza

— Reply to this email directly, view it on GitHub https://github.com/edupoli/MyZap2.0/issues/11#issuecomment-1889802292,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACYURAB7B4CAVSWLWRC2OA3YOGBXJAVCNFSM5STBW7L2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBYHE4DAMRSHEZA>

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/edupoli/MyZap2.0/issues/11#issuecomment-1889875062, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKOWY5L7F7QL6ILT4GRHLTYOGIUJAVCNFSM5STBW7L2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBYHE4DONJQGYZA . You are receiving this because you commented.Message ID: <edupoli/MyZap2. @.***>