php - Twilio costs, and displaying alternative name as phone number -
i sending sms using twilio, , says there pricing sms costs $0.02 when sending texts philippines. looked @ account , noticed charged $0.20.
also, how can display "gian" sender instead of random twilio number when sending sms because receiving sms +123178232(whatever) , changed name.. can has done before or has idea on how to me?
twilio developer evangelist here.
if there has been billing mistake, i'd advise take our team emailing help@twilio.com , including account sid.
in order send sms messages using alphanumeric sender id need check country sending messages supports alphanumeric sender ids (the philippines does) , use text want send instead of twilio number from
parameter in rest api call. so:
// require twilio helper library require "services/twilio.php"; // set accountsid , authtoken www.twilio.com/user/account $accountsid = "acxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; $authtoken = "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"; $client = new services_twilio($accountsid, $authtoken); // send message using name instead of number parameter $sms = $client->account->messages->sendmessage("gian", $tonumber, "your message");
note if send using alphanumeric sender id people receive sms messages not able reply. see other details sender ids here: https://www.twilio.com/help/faq/sms/what-is-alphanumeric-sender-id-and-how-do-i-get-started
hope helps!
Comments
Post a Comment