API - SISTEMA | BAILEYS | OFIC...
Mensagem HUB (Texto)
1min
\<?php $curl = curl init(); curl setopt array($curl, array( curlopt url => 'https //{backend url}/api/messages/sendofficialdata', 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", "text" "mensagem desejada" }', curlopt httpheader => array( 'content type application/json', 'authorization bearer tokenmeu' ), )); $response = curl exec($curl); curl close($curl); echo $response; { "response" { "from" "9aa5ed74 6d9c 4292 b44e 7f8ee2bfa022", "to" "5511989091838", "contents" "{\\"type\\" \\"text\\",\\"text\\" \\"teste\\"}", "id" "ab019db2 4172 4eea 910c d88fdd64f386", "direction" "out" } }