Closed SohrabZ closed 1 year ago
Dear sohrabz, did you found the solution?
We forked the project and removed the deprecated parts: https://github.com/aloware/signalwire-php
Could you share how to send a message? in Laravel Before I was doing like following
use SignalWire\Rest\Client;
public function send(){
$client = new Client(
'project_id'
'token',
'space_url'
);
$client->messages
->create(
"+18888186061", // to
array("+12504000000", "body" => "This is body message")
);
}
@ziagit here is a better version:
$params = [
'from' => $from_phone_number,
'body' => $message_body,
'method' => 'POST',
'statusCallback' => 'https://SOME_URL.com/status',
];
$response = $client->messages->create(
$recipient_phone_number,
$params
);
Dear @SohrabZ how should I create $client
object?
please share the full code.
really appreciated
when I try this code
public function send()
{
$params = [
'from' => '+18888186061',
'body' => 'Hi from signalwire',
'method' => 'POST',
'statusCallback' => 'https://tingsapp.com/home',
];
$client = new \SignalWire\Rest\Client(
'9e795027-...-...-....-5feee6200fe2',
'PT03a8382.............706a351942f',
['space_url' => 'tingsapp.signalwire.com']
);
$response = $client->messages->create(
'+12504000000',
$params
);
return $response;
}
I get the same error Class 'Twilio\Rest\Fax' not found
We released the v3.0.0 of the new https://packagist.org/packages/signalwire-community/signalwire#v3.0.0 package that includes this fix 👍
We recently started receiving this error:
From Signalwire PHP driver. Is there a fix to this? It's causing issues for us.