Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Code first
- * Error message or information below code
- */
- $message = $twilio->messages
- ->create("4792858856", // to
- array(
- "from" => "Cav Verktoy",
- "body" => "Test"
- )
- );
- // Renders: Exception: [HTTP 400] Unable to create record: The 'To' phone number: 4792858856, is not currently reachable using the 'From' phone number: Cav Verktoy via SMS.
- /**********************************************************************/
- $message = $twilio->messages
- ->create("4792858856", // to
- array(
- "from" => "Cav Verktoy",
- "body" => "Test",
- "messagingServiceSid" => "MGab2db51e861825ba3f64bc4813737246",
- )
- );
- /*
- * Throws no error on execution, but the SMS dashboard console on your site says: (Error: 21612) The 'To' phone number is not currently reachable via SMS You have attempted to send to a number that is not currently reachable via Twilio SMS. If the number provided is a properly formatted E.164, it is most likely that Twilio does not yet have service with the carrier you are trying to reach. We have logged the carrier you are attempting to reach and will monitor these failures when adding new carriers.
- * I'm sure the error here is that is attempting to use 479 as the country code, and that country code does not support alphanumeric sender
- * Then I run the following code:
- */
- /****************************************************************************/
- $message = $twilio->messages
- ->create("04792858856", // to
- array(
- "from" => "Cav Verktoy",
- "body" => "Test",
- "messagingServiceSid" => "MGab2db51e861825ba3f64bc4813737246",
- )
- );
- // Renders error: Exception: [HTTP 400] Unable to create record: The 'To' number 04792858856 is not a valid phone number.
- /**********************************************************************************/
- $message = $twilio->messages
- ->create("004792858856", // to
- array(
- "from" => "Cav Verktoy",
- "body" => "Test",
- "messagingServiceSid" => "MGab2db51e861825ba3f64bc4813737246",
- )
- );
- // Renders error: Exception: [HTTP 400] Unable to create record: The 'To' number 004792858856 is not a valid phone number.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement