Get account from Plivo - Java Message

Java examples for Message:Plivo

Description

Get account from Plivo

Demo Code


import com.plivo.sdk.client.RestAPI;
import com.plivo.sdk.exception.PlivoException;
import com.plivo.sdk.response.account.Account;
import com.plivo.sdk.xml.elements.Response;


public class AcoountDetails {
 public static void main(String[] args) {
    Account account= null;/*from   w  w w  .  j ava  2  s  .com*/
    RestAPI restApi = new RestAPI("<AUTH_ID>", "<AUTH_TOKEN>", "v1");
    try {
    account= restApi.getAccount();
    System.out.println("Account holders city: " +account.city);
    System.out.println("Account holders name: " +account.name);
    
    }
    catch (PlivoException e) {
      e.printStackTrace();
    }
    
  }

}

Related Tutorials