php - Twilio token not found when doing the QuickStart -


context: following instructions provided in twilio ios quickstart test out chat function. simple php server required generate tokens.

inside token.php, these lines generate token:

$token = new accesstoken(     $twilio_account_sid,      $twilio_api_key,      $twilio_api_secret,      3600,      $identity ); 

the instructions asked me modify config.php, have:

<?php // required uses $twilio_account_sid = 'actual_sid'; $twilio_api_key = 'actual_api_key'; $twilio_api_secret = 'actual_api_secret';  // required video $twilio_configuration_sid = '';  // required chat $twilio_chat_service_sid = 'actual_chat_service_sid';  // required notify $twilio_notification_service_sid = '';  // required sync $twilio_sync_service_sid = ''; 

as have instructed, run server php -s localhost:8000 -t webroot , following error:

/token.php?device=browser - class 'twilio\jwt\accesstoken' not found in /users/me/downloads/sdk-starter-php-master/webroot/token.php on line 19 

twilio developer evangelist here.

before running application php -s localhost:8000 -t webroot make sure have installed dependencies using composer:

composer install 

then should ready run.


Comments