Im trying to get a list of phone numbers under my Twilio account. Im using their example below, I took out the sid and token for security reasons.
include('/lib/Vendor/autoload.php');
use Twilio\Rest\Client;
$sid = "";
$token = "";
$client = new Client($sid,$token);
foreach ($client->incomingPhoneNumbers->read() as $number) {
echo $number->phoneNumber;
}
However I get this error:
Fatal error: Uncaught exception 'Twilio\Exceptions\DeserializeException' with message 'Page Records can not be deserialized' in E:\websites\twiliosite\lib\Vendor\twilio\sdk\Twilio\Page.php:90
Any idea what Im doing wrong? I googled this and couldnt find anything.