API - SISTEMA | BAILEYS | OFIC...
Mensagem de Texto
1min
\<?php $curl = curl init(); curl setopt array($curl, array( curlopt url => 'https //{backend url}/api/messages/send', curlopt returntransfer => true, curlopt encoding => '', curlopt maxredirs => 10, curlopt timeout => 0, curlopt followlocation => true, curlopt http version => curl http version 1 1, curlopt customrequest => 'post', curlopt postfields =>'{ "number" "5511993231592", //telefone em formato whatsapp "openticket" "0", //0 não abre ticket e 1 abre ticket "queueid" "0", // informe o id da fila desejada (se abrir ticket) "body" "teste" }', curlopt httpheader => array( 'content type application/json', 'authorization bearer seutokenaqui' //token cadastrado na conexão ), )); $response = curl exec($curl); curl close($curl); echo $response; { "mensagem" "mensagem enviada", "ticket" ticketdata }