Send Media Blank
wulandrima1 opened this issue · 1 comments
wulandrima1 commented
i execute script
<?php
$curl = curl_init();
$option='{"content": "https://www.wikipedia.org/portal/wikipedia.org/assets/img/Wikipedia-logo-v2@1.5x.png", "preview": "true"}';
curl_setopt_array($curl, array(
CURLOPT_URL => "http://localhost:8333/api/mytoken/media",
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=628212xxxxxx@c.us&option='.$option,
CURLOPT_HTTPHEADER => array(
"content-type: application/x-www-form-urlencoded"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
but blank received..
and show json
{
"number": "628212xxxxxx",
"option": {
},
"message": "Send",
"status_code": 200
}
why?
BlakePro commented
Please, check exampleBot.php in line 43, you need to 64 encode and send mimetype not just url