Create plivo Application - Java Message

Java examples for Message:Plivo

Description

Create plivo Application

Demo Code


import java.util.LinkedHashMap;

import com.plivo.sdk.client.RestAPI;
import com.plivo.sdk.exception.PlivoException;
import com.plivo.sdk.response.account.Account;
import com.plivo.sdk.response.response.GenericResponse;
import com.plivo.sdk.xml.elements.Response;
public class CreateApplication {


  public static void main(String[] args) {

    GenericResponse response = null;/*from  w ww.  j  a v  a2 s. c o m*/
    RestAPI restApi = new RestAPI("<AUTH_ID>", "<AUTH_TOKEN>", "v1");
    LinkedHashMap<String,String> parmas = new LinkedHashMap<String,String>();
    parmas.put("answer_url","https://your server/your name.xml?w=81522631");
    parmas.put("app_name", "xyz");
    try
    {
      response = restApi.createApplication(parmas);
      System.out.println("Application created with message: " + response.message);
            
    }
    catch (PlivoException e) {
    
    }
  }

}

Related Tutorials