Flowbuilder Nativo
Webhooks
5min
JS
1let data = JSON.stringify({
2 "number": "{{number}}",
3 "customData": {
4 "body": "Olá {{name}}, utilize o botão abaixo para copiar e colar a chave pix para pagamento dos R$ 100,00 referentes ao setup dos botões na Baileys! Após a transferência, envie seu comprovante nesta mensagem.",
5 "name": "cta_copy",
6 "params": "{\"display_text\":\"Copiar Código PIX CNPJ para Pagamento\",\"id\":\"6deb1c2f-7863-45eb-8b11-17a8f8131288\",\"copy_code\":\"13959856000130\",\"disabled\":false}"
7 }
8});
9
10let config = {
11 method: 'post',
12 maxBodyLength: Infinity,
13 url: 'https://{{backendURL}}/api/messages/sendCopyPaste',
14 headers: {
15 'Content-Type': 'application/json',
16 'Authorization': 'Bearer {{connection_token}}'
17 },
18 data : data
19};
20
21axios.request(config)
22.then((response) => {
23 console.log(JSON.stringify(response.data));
24})
25.catch((error) => {
26 console.log(error);
27});
28
JS
1let data = JSON.stringify({
2 "number": "{{number}}",
3 "customData": {
4 "body": "Olá {{name}}, visite meu site abaixo...",
5 "name": "cta_url",
6 "params": "{\"display_text\":\"Acesse meu Site\",\"id\":\"6deb1c2f-7863-45eb-8b11-17a8f8131288\",\"url\":\"https://whaticket-saas.com\",\"disabled\":false}"
7 }
8});
9
10let config = {
11 method: 'post',
12 maxBodyLength: Infinity,
13 url: 'https://{{backendURL}}/api/messages/sendURLBTN',
14 headers: {
15 'Content-Type': 'application/json',
16 'Authorization': 'Bearer {{connection_token}}'
17 },
18 data : data
19};
20
21axios.request(config)
22.then((response) => {
23 console.log(JSON.stringify(response.data));
24})
25.catch((error) => {
26 console.log(error);
27});
28
JS
1let data = JSON.stringify({
2 "number": "{{number}}",
3 "customData": {
4 "body": "Então {{name}}, me diz o que você achou?",
5 "name": "quick_reply",
6 "params": "{\"display_text\":\"LEGAL\",\"id\":\"aaa\",\"disabled\":false}",
7 "nameb": "quick_reply",
8 "paramsb": "{\"display_text\":\"NÃO GOSTEI\",\"id\":\"ccc\",\"disabled\":false}"
9 }
10});
11
12let config = {
13 method: 'post',
14 maxBodyLength: Infinity,
15 url: 'https://{{backendURL}}/api/messages/sendBTN2',
16 headers: {
17 'Content-Type': 'application/json',
18 'Authorization': 'Bearer {{connection_token}}'
19 },
20 data : data
21};
22
23axios.request(config)
24.then((response) => {
25 console.log(JSON.stringify(response.data));
26})
27.catch((error) => {
28 console.log(error);
29});
JS
1 let data = JSON.stringify({
2 "number": "{{number}}",
3 "customData": {
4 "body": "Aqui vem o Body",
5 "footer": "Rodapé",
6 "imageURL": "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png",
7 "title": "Título",
8 "caption": "Caption",
9 "buttons": "[{\"buttonId\":\"id1\",\"type\":2,\"buttonText\":{\"displayText\":\"Botao 1\"},\"nativeFlowInfo\":{\"name\":\"quick_reply\",\"paramsJson\":\"{\\\"display_text\\\":\\\"Botao 1\\\",\\\"id\\\":\\\"id1\\\",\\\"disabled\\\":false}\"}},{\"buttonId\":\"id2\",\"buttonText\":{\"displayText\":\"Botao 2\"},\"type\":1},{\"buttonId\":\"id3\",\"buttonText\":{\"displayText\":\"Botao 3\"},\"type\":1}]"
10 }
11});
12
13 let config = {
14 method: 'post',
15 maxBodyLength: Infinity,
16 url: 'https://{{backendURL}}/api/messages/sendBTN',
17 headers: {
18 'Content-Type': 'application/json',
19 'Authorization': 'Bearer {{connection_token}}'
20 },
21 data : data
22 };
23
24 axios.request(config)
25 .then((response) => {
26 console.log(JSON.stringify(response.data));
27 })
28 .catch((error) => {
29 console.log(error);
30 });
Updated 08 Oct 2024
Did this page help you?