mehdigogo - 10
  الصفحة الرئيسية
  القران الكريم
  تحميل البرامج
  شات
  اخبار
  تحميل متنوع
  ترجمة فورية
  مراسلة
  الجريدة
  فيديو
  كتاب الدهبي
  tv online
  الالعاب
  افلام
  امسن
  اغاني كرة القدم
  ماسنجر
  اسلام
  10
  sms
package com.plivo.test;

import java.util.LinkedHashMap;
import com.plivo.helper.api.client.*;
import com.plivo.helper.api.response.message.MessageResponse;
import com.plivo.helper.exception.PlivoException;

public class SendAlphanumeric {
    public static void main(String[] args) {
        String authId = "Your AUTH_ID";
        String authToken = "Your AUTH_TOKEN";
        RestAPI api = new RestAPI(authId, authToken, "v1");

        LinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();
        parameters.put("src", "ALPHA-ID"); // Alphanumeric Sender ID
        parameters.put("dst", "1111111111"); // Receiver's phone number with country code
        parameters.put("text", "Hi, text from Plivo"); // Your SMS text message

        try {
            // Send the Message
            MessageResponse msgResponse = api.sendMessage(parameters);
            // Print the response
            System.out.println(msgResponse);
            // Print the Api ID
            System.out.println("Api ID : " + msgResponse.apiId);
            // Print the Response Message
            System.out.println("Message : " + msgResponse.message);
            if (msgResponse.serverCode == 202) {
                // Print the Message UUID
                System.out.println("Message UUID : " + msgResponse.messageUuids.get(0).toString());
            } else {
                System.out.println(msgResponse.error);
            }
        } catch (PlivoException e) {
            System.out.println(e.getLocalizedMessage());
        }
    }
}
Aujourd'hui sont déjà 8 visiteurs (11 hits) Ici!
Ce site web a été créé gratuitement avec Ma-page.fr. Tu veux aussi ton propre site web ?
S'inscrire gratuitement