Category : twilio

I am generating Access Token for Video Call in Twilio. Everything is set according to their documentation but still getting error INVALID_TOKEN The token is invalid or malformed. Code to generate access token is below: // Required for all Twilio access tokens $twilioAccountSid = env("TWILIO_ACCOUNT_SID"); // starting with AC $twilioApiKey = env("TWILIO_API_SID"); // Starting with ..

Read more

I create a conversation with my phone number to opt out of the texting service to test. Once opted out, I will delete the conversation so my application doesnt try to add the message onto the current Conversation->sid. But when I create a conversation it does not throw a Twilio error. Even though it should ..

Read more

I’m trying to decrypt encrypted Twilio recording using PHP https://www.twilio.com/docs/voice/tutorials/voice-recording-encryption#step-5 This is my Encryption Details: I have successfully perform first step: $privateKey = openssl_get_privatekey(‘—–BEGIN RSA PRIVATE KEY—– *****’); $result = openssl_private_decrypt( base64_decode(‘< encrypted_cek from EncryptionDetails >’), $decryptedKeyData, $privateKey, OPENSSL_NO_PADDING ); Then I’m trying to decrypt recording using openssl_decrypt function: $data = base64_decode(file_get_contents(‘https://api.twilio.com/2010-04-01/Accounts/AC***/Recordings/RE***’)); $tag = substr($data,-16); ..

Read more

I am not able to return any of the fields when the key has an underscore. This returns the value as expected: $calls = $twilio->calls->read([], 20); foreach ($calls as $record) { print($record->from); } This does not return the value: $calls = $twilio->calls->read([], 20); foreach ($calls as $record) { print($record->from_formatted); } Sourc..

Read more

If i put a call on hold means the primary number is on hold but the secondary number was disconnected.. $arrR = array(); $callSid = "sample callsid here"; $client = new Client(SmsSpool::$arrTwilioSetting[‘sid’], SmsSpool::$arrTwilioSetting[‘auth_token’]); $rr = array( "url" => "http://demo.twilio.com/docs/voice.xml", "method" => "POST" ); $call = $client->calls($callSid)->update($rr); $op = $call->to; $arrR[] = $op; return $arrR; Here ..

Read more