SMS API | Twilio

文章推薦指數: 80 %
投票人數:10人

Send and receive text messages across channels with Twilio's trusted APIs on MessagingX. Support commerce, customers, notifications, and more with two-way, ... SkiptomaincontentTwilio Products Messaging SendandreceivetextmessagesSMSWhatsAppChat ProgrammableVoice Make,receive,andmonitorcallsaroundtheworld Video BuildHDreal-timevideoapplications TwilioLive Buildinteractiveaudioandvideolivestreamingexperiences Email Deliveremailmessagesreliablyatscale TwilioFlex Buildwiththemostflexiblecloudcontactcenter MarketingCampaigns Createandmanageemailmarketingcampaigns TwilioFrontline Connectemployeestocustomerssecurelyfromanywhere AccountSecurity Preventsignupfraud,accounttakeovers,andprotecttransactionsAuthyVerifyLookup TwilioSegment Unifyyourcustomerdatatopowerpersonalizedengagement InternetofThings ConnectIoTdevicestoglobalcellularnetworks ElasticSIPTrunking DeploySIPtrunksgloballyinminutes PhoneNumbers Accesslocal,national,andtoll-freephonenumbers ShortCodes Sendtextandpicturemessagesatscale Solutions Marketing Keepcustomersengagedonanychannel Operations StreamlineworkforceoperationsandcustomerfulfillmentAlerts&NotificationsIdentity&Verification CustomerService DeliverpersonalizedcustomerexperiencesatscaleContactCenterIVR&Bots FinancialServices Retail Hospitality RealEstate Healthcare Enterprise Startup Nonprofit CustomerStories SeewhatcustomersarebuildingwithTwilio ResourceCenter Browseourcontentlibraryformoreresourcesonhowyoucancreatelastingcustomerrelationships TwilioBetaCenter Discoverourcurrentbetaprogramsandfindouthowyoucanparticipate A2P10DLC PrepareforthenewA2P10DLCrequirements Developers TwilioFlex SMS ProgrammableVoice Video Email WhatsAppAPI ElasticSIPTrunking SuperSIM Verify Seealldocs Ahoy! Getinspiredbythelatestfromourdevelopercommunity Blog Readtutorials,communityprojects,andproductupdates StackOverflow AsktheTwiliocommunityforhelp Champions BecomeaTwiliocommunityChampion DeveloperEvents BetaJoinupcominggroupevents CodeExchange Usablecodesamplesforfasterbuilds Changelog SeeupdatesandadditionstoTwilioproducts APIStatus Checkreal-timemonitoringofAPIsandallservices TwilioEducation Learnpracticalcodingskillsthroughlivetraining,studentprograms,andTwilioQuest Services&Support Findapartner WorkwithaTwiliopartnertobuyorbuildtherightsolution Partnerwithus JoinourBuildProgramasatechnologyorconsultingpartner ProfessionalServices GettechnicalandstrategicadvicefromTwilioexperts Training Learnhowtoarchitect,build,andsupportyourapps TalktoSupport HelpCenter FrequentlyAskedQuestions SupportPlans Pricing ProgrammableVoice WhatsAppAPI SMS Video Conversations Email Authy Verify Lookup TwilioFlex TwilioFrontline MarketingCampaigns SuperSIM Wireless ElasticSIPTrunking Notify SeeallpricingSignupLoginTalktoanexpertTalktoanexpertSignupMenuMessagingX Overview APIs ProgrammableMessagingAPI ConversationsAPI Channels SMS WhatsApp FacebookMessengerforBusiness Google'sBusinessMessages MMS Chat Pricing WhatsApp SMS Conversations SMS DeliveratscalewithprovenAPIsforSMS SendandreceivetextmessageswithjustafewlinesofcodeonMessagingX,thetrustedplatformforcross-channelmessaging. Signupforfree Talktosales EngagecustomersgloballywithreliableSMSmessagingLaunchingatrustedSMSsolutioniseasywithMessagingX.Twiliogivesyoudeveloper-friendlyAPIs,scalability,andbuilt-insoftwareforcompliance,routing,andadvancedusecases.Alltohelpyougettomarketfaster,andwithunmatcheddeliverability.APIsScalefromconcepttoglobalsolutionwithflexibleSMSAPIsProgrammableMessagingAPISendtransactionalSMS,MMS,andWhatsAppmessageswithasingleAPI.Reach180+countriesreliablywithlocalizedsenders,compliancetools,andglobalguidelines.Managecompliance,deliverability,replies,andmorewithTwilio’sprogrammablesoftware.Monitorandtroubleshootmessagedeliveryandengagementwithreal-timeanalytics. ExploretheProgrammableMessagingAPI ConversationsAPIDrivetwo-wayengagementoverSMSandotherpreferredchannelswithasingleAPI.PowercommerceandsupportonSMS,MMS,chat,FacebookMessenger,Google’sBusinessMessages,andWhatsApp.Manageparticipants,archivemessages,andorchestrateworkflowswithoutadditionalcode.Gettomarketfasterwithquick-starts,sampleapps,andSDKs. ExploretheConversationsAPI UsecasesStartandscalecustomerrelationshipsNotificationsSendpersonalizedalerts,reminders,andnotificationsforappointments,deliveries,andmorewiththeProgrammableMessagingAPI.VerificationsDeliverone-timepasswordsforfastonboardingthatreducessupportcostsandfraudatonce.PromotionsDistributemarketingmessagesandofferswiththeProgrammableMessagingAPItodriveleads,sales,andloyalty.ConversationalcareandcommerceSupportthefullcustomerjourneywithtwo-way,SMSforsupport,sales,andleadgenerationwiththeConversationsAPI.Developerresources Createamessage Node.jsC#PHPRubyPythonJavacurltwilio-cli//Downloadthehelperlibraryfromhttps://www.twilio.com/docs/node/install//FindyourAccountSIDandAuthTokenattwilio.com/console//andsettheenvironmentvariables.Seehttp://twil.io/secureconstaccountSid=process.env.TWILIO_ACCOUNT_SID;constauthToken=process.env.TWILIO_AUTH_TOKEN;constclient=require('twilio')(accountSid,authToken);client.messages.create({from:'+15017122661',body:'Hithere',to:'+15558675310'}).then(message=>console.log(message.sid));//InstalltheC#/.NEThelperlibraryfromtwilio.com/docs/csharp/installusingSystem;usingTwilio;usingTwilio.Rest.Api.V2010.Account;classProgram{staticvoidMain(string[]args){//FindyourAccountSIDandAuthTokenattwilio.com/console//andsettheenvironmentvariables.Seehttp://twil.io/securestringaccountSid=Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");stringauthToken=Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");TwilioClient.Init(accountSid,authToken);varmessage=MessageResource.Create(from:newTwilio.Types.PhoneNumber("+15017122661"),body:"Hithere",to:newTwilio.Types.PhoneNumber("+15558675310"));Console.WriteLine(message.Sid);}}messages->create("+15558675310",//to["from"=>"+15017122661","body"=>"Hithere"]);print($message->sid);#Downloadthehelperlibraryfromhttps://www.twilio.com/docs/ruby/installrequire'rubygems'require'twilio-ruby'#FindyourAccountSIDandAuthTokenattwilio.com/console#andsettheenvironmentvariables.Seehttp://twil.io/secureaccount_sid=ENV['TWILIO_ACCOUNT_SID']auth_token=ENV['TWILIO_AUTH_TOKEN']@client=Twilio::REST::Client.new(account_sid,auth_token)[email protected](from:'+15017122661',body:'Hithere',to:'+15558675310')putsmessage.sid#Downloadthehelperlibraryfromhttps://www.twilio.com/docs/python/installimportosfromtwilio.restimportClient#FindyourAccountSIDandAuthTokenattwilio.com/console#andsettheenvironmentvariables.Seehttp://twil.io/secureaccount_sid=os.environ['TWILIO_ACCOUNT_SID']auth_token=os.environ['TWILIO_AUTH_TOKEN']client=Client(account_sid,auth_token)message=client.messages.create(from_='+15017122661',body='Hithere',to='+15558675310')print(message.sid)//InstalltheJavahelperlibraryfromtwilio.com/docs/java/installimportcom.twilio.Twilio;importcom.twilio.rest.api.v2010.account.Message;importcom.twilio.type.PhoneNumber;publicclassExample{//FindyourAccountSIDandAuthTokenattwilio.com/console//andsettheenvironmentvariables.Seehttp://twil.io/securepublicstaticfinalStringACCOUNT_SID=System.getenv("TWILIO_ACCOUNT_SID");publicstaticfinalStringAUTH_TOKEN=System.getenv("TWILIO_AUTH_TOKEN");publicstaticvoidmain(String[]args){Twilio.init(ACCOUNT_SID,AUTH_TOKEN);Messagemessage=Message.creator(newcom.twilio.type.PhoneNumber("+15558675310"),newcom.twilio.type.PhoneNumber("+15017122661"),"Hithere").create();System.out.println(message.getSid());}}curl-XPOSThttps://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Messages.json\--data-urlencode"From=+15017122661"\--data-urlencode"Body=Hithere"\--data-urlencode"To=+15558675310"\-u$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN#Installthetwilio-clifromhttps://twil.io/cli twilioapi:core:messages:create\ --from+15017122661\ --body"Hithere"\ --to+15558675310 ReadtheDocsExplorequick-startguides,codesnippets,SDKs,andmoreinourcomprehensiveresourcelibrarytokickstartyourSMSsolutionwithMessagingX. ReadSMSDocs GetstartedwithMessagingX PricingSMSmadeeasywithMessagingXSendandreceivetextmessagesatscalewithtwodeveloper-friendlyAPIsinonetrustedplatform,MessagingX.Payasyougoandenjoyscalingdiscountsforhigh-volumeandlong-termuse. Seepricing ExploreMessagingX



請為這篇文章評分?