<?php require 'vendor/autoload.php'; use Plivo\RestAPI; $auth_id = "Your AUTH_ID"; $auth_token = "Your AUTH_TOKEN"; $p = new RestAPI($auth_id, $auth_token); // Get Details of all existing Applications $params = array('limit' => '2', 'offset' => '0'); $response = $p->get_applications($params); // print_r ($response['response']); /* Sample Output ( [api_id] => cff47926-ac45-11e4-b153-22000abcaa64 [meta] => Array ( [limit] => 20 [next] => [offset] => 0 [previous] => [total_count] => 2 ) [objects] => Array ( [0] => Array ( [answer_method] => POST [answer_url] => http://example.com [app_id] => 23061826722302672 [app_name] => Testing [default_app] => [default_endpoint_app] => [enabled] => 1 [fallback_answer_url] =>
$auth_token = "Your AUTH_TOKEN"; $p = new RestAPI($auth_id, $auth_token); // Create an Application $params = array('answer_url' => 'http://example.com', 'app_name' => 'Testing'); $response = $p->create_application($params); // print_r ($response['response']); /* Sample Output ( [api_id] => ad7a2eb8-ac45-11e4-b932-22000ac50fac [app_id] => 23061826722302672 [message] => created ) */ // Get Details of all existing Applications $response = $p->get_applications(); // print_r ($response['response']); /* Sample Output ( [api_id] => cff47926-ac45-11e4-b153-22000abcaa64 [meta] => Array ( [limit] => 20 [next] => [offset] => 0 [previous] => [total_count] => 2 ) [objects] => Array ( [0] => Array ( [answer_method] => POST [answer_url] => http://example.com