Package com.twilio.sdk.resource.factory

Examples of com.twilio.sdk.resource.factory.MessageFactory


    callParams.put("Url", "http://demo.twilio.com/welcome/voice/");
    Call call = callFactory.create(callParams);
    System.out.println(call.getSid());

    // Send an sms (using the new messages endpoint)
    MessageFactory messageFactory = mainAccount.getMessageFactory();
    List<NameValuePair> messageParams = new ArrayList<NameValuePair>();
    messageParams.add(new BasicNameValuePair("To", "5105551212")); // Replace with a valid phone number
    messageParams.add(new BasicNameValuePair("From", "(510) 555-1212")); // Replace with a valid phone
    // number in your account
    messageParams.add(new BasicNameValuePair("Body", "This is a test message!"));
    messageFactory.create(messageParams);

        // Search for all available phone numbers
        AvailablePhoneNumberList phoneNumbers = mainAccount.getAvailablePhoneNumbers();
        List<AvailablePhoneNumber> phoneNumberList = phoneNumbers.getPageData();
View Full Code Here

TOP

Related Classes of com.twilio.sdk.resource.factory.MessageFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.