I have implemented everything as per the given instructions on the above written document. Through ngrok tunneling I am able to make calls using my localhost on windows, but when I am trying the same on the live environment in a linux based server I am facing the below error: -
Could not get a token from server!
I had observed the same error while implementing on localhost, but the error was due to the file path and file non-existence. But in the live environment I have done all those changes that helped me previously to sort the issue, but I am unable to get the token on live environment thus am unable to make calls through the live panel..
Below is my directory system in the cpanel: -
1) vendor(autoload.php)
2) voice.php
3) token.php
4) quickstart.js
5) randos.php
6) token.php
7) Other composer, composer.json and index file.
I have given path according to the PHP include as shown below: -
1) voice.php :-
include("vendor/autoload.php");
include("config.php");
I am writing this in regard with Voice App using Twilio Client : https://www.twilio.com/code-exchange/voice-app-using-twilio-client
I have implemented everything as per the given instructions on the above written document. Through ngrok tunneling I am able to make calls using my localhost on windows, but when I am trying the same on the live environment in a linux based server I am facing the below error: - Could not get a token from server!
I had observed the same error while implementing on localhost, but the error was due to the file path and file non-existence. But in the live environment I have done all those changes that helped me previously to sort the issue, but I am unable to get the token on live environment thus am unable to make calls through the live panel..
Below is the configuration of my config.php: -
$TWILIO_ACCOUNT_SID = ' my_account_sid' ; $TWILIO_AUTH_TOKEN = 'my_account_auth_token'; $TWILIO_TWIML_APP_SID = 'AP57ec82163d9da05de4c7a9f6a7a20987'; $TWILIO_CALLER_ID = '+18553762332';
Below is my directory system in the cpanel: - 1) vendor(autoload.php) 2) voice.php 3) token.php 4) quickstart.js 5) randos.php 6) token.php 7) Other composer, composer.json and index file.
I have given path according to the PHP include as shown below: - 1) voice.php :- include("vendor/autoload.php"); include("config.php");
2) token.php include("vendor/autoload.php"); include("config.php"); include("randos.php");
Kindly assist with the help using the above given information. Kindly let us know how we can get it running in a live environment.