API - SISTEMA | BAILEYS | OFIC...

Botão URL

1min
\<?php $curl = curl init(); curl setopt array($curl, array( curlopt url => 'https //{backend url}/api/messages/sendurlbtn', 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", "customdata" { "body" "aqui vem o body", "name" "cta url", "params" "{\\\\"display text\\\\" \\\\"ir para site2\\\\",\\\\"id\\\\" \\\\"aaaaaa 7863 45eb 8b11 17a8f8132388\\\\",\\\\"url\\\\" \\\\"https //www google com br\\\\",\\\\"disabled\\\\"\ false}" } }', curlopt httpheader => array( 'content type application/json', 'authorization bearer seutokenaqui' //token cadastrado na conexão ), )); $response = curl exec($curl); curl close($curl); echo $response;