Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.29 KB | None | 0 0
  1. /**
  2.  * Code first
  3.  * Error message or information below code
  4. */
  5.  
  6. $message = $twilio->messages
  7.     ->create("4792858856", // to
  8.         array(
  9.             "from" => "Cav Verktoy",
  10.             "body" => "Test"
  11.         )
  12.     );
  13. // 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.
  14.  
  15. /**********************************************************************/
  16.  
  17. $message = $twilio->messages
  18.     ->create("4792858856", // to
  19.         array(
  20.             "from" => "Cav Verktoy",
  21.             "body" => "Test",
  22.             "messagingServiceSid" => "MGab2db51e861825ba3f64bc4813737246",
  23.         )
  24.     );
  25.  
  26. /*
  27.  * 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.
  28.  * 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
  29.  * Then I run the following code:
  30.  */
  31.  
  32. /****************************************************************************/
  33.  
  34. $message = $twilio->messages
  35.     ->create("04792858856", // to
  36.         array(
  37.             "from" => "Cav Verktoy",
  38.             "body" => "Test",
  39.             "messagingServiceSid" => "MGab2db51e861825ba3f64bc4813737246",
  40.         )
  41.     );
  42.  
  43. // Renders error: Exception: [HTTP 400] Unable to create record: The 'To' number 04792858856 is not a valid phone number.
  44.  
  45. /**********************************************************************************/
  46.  
  47. $message = $twilio->messages
  48.     ->create("004792858856", // to
  49.         array(
  50.             "from" => "Cav Verktoy",
  51.             "body" => "Test",
  52.             "messagingServiceSid" => "MGab2db51e861825ba3f64bc4813737246",
  53.         )
  54.     );
  55.  
  56. // 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