$ch = curl_init("https://apiwhatsapp.sinesc.com.br/send-message");
$data = ["to" => "5581999999999", "message" => "Olá, teste!"];
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
const axios = require('axios');
axios.post('https://apiwhatsapp.sinesc.com.br/send-message', {
to: '5581999999999',
message: 'Olá, teste!'
}).then(res => {
console.log(res.data);
});
import requests
url = "https://apiwhatsapp.sinesc.com.br/send-message"
payload = {"to": "5581999999999", "message": "Olá, teste!"}
response = requests.post(url, json=payload)
print(response.text)
curl -X POST https://apiwhatsapp.sinesc.com.br/send-message \
-H "Content-Type: application/json" \
-d '{"to":"5581999999999","message":"Olá, teste!"}'
<?php
$data = json_decode(file_get_contents('php://input'), true);
if (isset($data['from']) && isset($data['message'])) {
echo "Nova mensagem de: " . $data['from'];
}
axios.post('https://apiwhatsapp.sinesc.com.br/send-media', {
to: '5581999999999',
mediaUrl: 'https://exemplo.com/imagem.jpg',
caption: 'Veja esta imagem!'
});
{
"url": "https://apiwhatsapp.sinesc.com.br/send-message",
"token": "49a000f70b150e60c3cefdcc091a100cfcb0f5c4f33a902b1b760f7f2edfe168",
"id": "NDhJG4gYSvItP1n-mnsV451d3gWvZLI",
"set_msg": "message",
"do_post": 1
}
Preencha o Gateway WhatsApp da seguinte forma:
Servidor: https://apiwhatsapp.sinesc.com.br/send-message
Conta: seu token
Senha: seu id