API - SISTEMA | BAILEYS | OFIC...
API Oficial (NATIVA) - CTA_URL
2 min
envio de template \<?php $curl = curl init(); curl setopt array($curl, array( curlopt url => 'https //{backend url}/api/messages/sendctaurl', 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" "5511989091838", "body" { "text" "acesse nosso site!" }, "displaytext" "visitar site", "url" "https //exemplo com", "header" { "type" "text", "text" "promoção" }, "footer" { "text" "válido até 31/12" } }', curlopt httpheader => array( 'content type application/json', 'authorization bearer seutoken' ), )); $response = curl exec($curl); curl close($curl); echo $response;
