{"_id":"590a2e771f1bbf190090ade3","parentDoc":null,"version":{"_id":"558d9c33beb7c719007f631c","project":"558d9c32beb7c719007f6319","__v":19,"createdAt":"2015-06-26T18:38:43.154Z","releaseDate":"2015-06-26T18:38:43.153Z","categories":["558d9c33beb7c719007f631d","558db0bc7afc102f008ed863","558db0d07afc102f008ed864","558db3c84cd25f0d00b7ecb2","558dbace7afc102f008ed894","558dbd104cd25f0d00b7ecca","558dbd4c4cd25f0d00b7eccb","559d3e858639bd21008e90a6","55bb8ca5a8400c2d00873e70","58fdfb438fbd2819000db9eb","590829c7ade4172d006a87b8","59082a11beedcf0f00235d87","5908bd2cba2afd23007d6d12","5908d1f64f544425002b6aae","591e5e9e2c1b1f0f000fa4e5","5a283434aba91f002834ea86","5a69fe5cde745d002c936c66","5a81e6ef761cf300127317f8","5a81e7d63b1e120012bed5a1"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":0,"githubsync":"","category":{"_id":"558db0bc7afc102f008ed863","pages":["558dbe324cd25f0d00b7ecce","558dbe407afc102f008ed8a4","558dbe567afc102f008ed8a9","558dbe677afc102f008ed8ac","558dbe7e4cd25f0d00b7ecd0","558dbea37afc102f008ed8b2","558dbeb27afc102f008ed8b4","558dbec14cd25f0d00b7ecd2","558dbed0beb7c719007f63b4","558dbf61beb7c719007f63ba"],"version":"558d9c33beb7c719007f631c","project":"558d9c32beb7c719007f6319","__v":10,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-06-26T20:06:20.813Z","from_sync":false,"order":2,"slug":"call-initiation-api","title":"Call Initiation APIs"},"user":"58cadf93d223510f005d27db","project":"558d9c32beb7c719007f6319","updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-05-03T19:24:39.738Z","link_external":false,"link_url":"","sync_unique":"","hidden":true,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Use the Click-to-Virtual Receptionist API to initiate a phone call between a phone number and a Virtual Receptionist\"\n}\n[/block]\nThe Click-to-Virtual Receptionist API is used to initiate a phone call between one phone number and a DialogTech Virtual Receptionist.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Base URL for Click-to-Virtual Receptionist\",\n  \"body\": \"https://secure.dialogtech.com/ibp_api.php\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Parameter List\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Required\",\n    \"h-2\": \"Accepts\",\n    \"0-0\": \"access_key\",\n    \"0-1\": \"Yes\",\n    \"1-0\": \"secret_access_key\",\n    \"1-2\": \"String\",\n    \"2-0\": \"action\",\n    \"2-1\": \"Yes\",\n    \"1-1\": \"Yes\",\n    \"0-2\": \"String\",\n    \"2-2\": \"String: **clickto.vr**\",\n    \"h-3\": \"Max Length\",\n    \"0-3\": \"n/a\",\n    \"h-4\": \"Notes\",\n    \"h-5\": \"Usage\",\n    \"0-4\": \"Access Key from the Key Manager within a DialogTech account\",\n    \"0-5\": \"Credentials used for access to the API for a particular DialogTech account\",\n    \"1-4\": \"Secret Access Key from the Key Manager within a DialogTech account\",\n    \"1-3\": \"n/a\",\n    \"2-3\": \"n/a\",\n    \"2-4\": \"Only accepts **clickto.vr** for Click-to-Virtual Receptionist\",\n    \"1-5\": \"Credentials used for access to the API for a particular DialogTech account\",\n    \"2-5\": \"Defines the API call as a \\\"Click-to-Virtual Receptionist\\\" type\",\n    \"3-0\": \"menu_id\",\n    \"3-1\": \"Yes\",\n    \"3-2\": \"String: Existing Virtual Receptionist ID\",\n    \"3-3\": \"n/a\",\n    \"3-4\": \"An existing Virtual Receptionist ID must be utilized. To find IDs for any existing Virtual Receptionist within your account, enter the menu *Developer Tools* **->** *Building Block IDs*\",\n    \"3-5\": \"Determines which Virtual Receptionist the *phone_to_call* third party will be joined to.\",\n    \"4-0\": \"phone_to_call\",\n    \"4-1\": \"Yes\",\n    \"4-2\": \"String: Unformatted Phone Number\",\n    \"4-3\": \"n/a\",\n    \"4-4\": \"Can be any unformatted phone number\",\n    \"4-5\": \"Defines the third party being joined to the call\"\n  },\n  \"cols\": 6,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Using this API\"\n}\n[/block]\nThese code examples are meant to show a basic method of accessing DialogTech's Click-to-Virtual Receptionist API.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  /*\\n    Click-to-Virtual Receptionist:\\n    This example will use access_key and secret_access_key\\n    for a Click-to-Virtual Receptionist\\n  */\\n\\n  // create curl resource\\n  $ch = curl_init(); \\n  $baseuri = \\\"https://secure.dialogtech.com/ibp_api.php?\\\";\\n\\n  // API Specific Static Parameters\\n  $action = \\\"clickto.vr\\\";\\n\\n  // Required User Parameters\\n  $access_key = \\\"foo\\\";\\n  $secret_access_key = \\\"bar\\\";\\n  $menu_id = \\\"55443322\\\";\\n  $phone_to_call = \\\"5551112222\\\";\\n\\n  // Construct the full URL\\n  $full_url = $baseuri . \\\"&action=\\\" . $action .\\n    \\\"&access_key=\\\" . $access_key .\\n    \\\"&secret_access_key=\\\" . $secret_access_key .\\n    \\\"&menu_id=\\\" . $menu_id .\\n    \\\"&phone_to_call=\\\" . $phone_to_call;\\n\\n  // Set the URL\\n  curl_setopt($ch, CURLOPT_URL, $full_url);\\n\\n  // Sets the return options of the cURL to return the actual result from the curl request, and FALSE on failure\\n  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\\n\\n  // Sets the $output variable to the result of the curl\\n  $output = curl_exec($ch);\\n\\n  // Close curl resource to free up system resources\\n  curl_close($ch);\\n\\n  // Send the API output to the php page\\n  echo \\\"API response is: \\\" . $output;\\n?>\",\n      \"language\": \"php\",\n      \"name\": \"PHP Example\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Example Response\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Call Connected\",\n      \"language\": \"text\",\n      \"name\": \"Success\"\n    }\n  ]\n}\n[/block]","excerpt":"Used to initiate a phone call between one phone number and a DialogTech Virtual Receptionist","slug":"click-to-virtual-receptionist","type":"basic","title":"Click-to-Virtual Receptionist"}

Click-to-Virtual Receptionist

Used to initiate a phone call between one phone number and a DialogTech Virtual Receptionist

Use the Click-to-Virtual Receptionist API to initiate a phone call between a phone number and a Virtual Receptionist

The Click-to-Virtual Receptionist API is used to initiate a phone call between one phone number and a DialogTech Virtual Receptionist.

Base URL for Click-to-Virtual Receptionist

https://secure.dialogtech.com/ibp_api.php

Parameter List

Parameter
Required
Accepts
Max Length
Notes
Usage

access_key

Yes

String

n/a

Access Key from the Key Manager within a DialogTech account

Credentials used for access to the API for a particular DialogTech account

secret_access_key

Yes

String

n/a

Secret Access Key from the Key Manager within a DialogTech account

Credentials used for access to the API for a particular DialogTech account

action

Yes

String: clickto.vr

n/a

Only accepts clickto.vr for Click-to-Virtual Receptionist

Defines the API call as a "Click-to-Virtual Receptionist" type

menu_id

Yes

String: Existing Virtual Receptionist ID

n/a

An existing Virtual Receptionist ID must be utilized. To find IDs for any existing Virtual Receptionist within your account, enter the menu Developer Tools -> Building Block IDs

Determines which Virtual Receptionist the phone_to_call third party will be joined to.

phone_to_call

Yes

String: Unformatted Phone Number

n/a

Can be any unformatted phone number

Defines the third party being joined to the call

Using this API

These code examples are meant to show a basic method of accessing DialogTech's Click-to-Virtual Receptionist API.

<?php
  /*
    Click-to-Virtual Receptionist:
    This example will use access_key and secret_access_key
    for a Click-to-Virtual Receptionist
  */

  // create curl resource
  $ch = curl_init(); 
  $baseuri = "https://secure.dialogtech.com/ibp_api.php?";

  // API Specific Static Parameters
  $action = "clickto.vr";

  // Required User Parameters
  $access_key = "foo";
  $secret_access_key = "bar";
  $menu_id = "55443322";
  $phone_to_call = "5551112222";

  // Construct the full URL
  $full_url = $baseuri . "&action=" . $action .
    "&access_key=" . $access_key .
    "&secret_access_key=" . $secret_access_key .
    "&menu_id=" . $menu_id .
    "&phone_to_call=" . $phone_to_call;

  // Set the URL
  curl_setopt($ch, CURLOPT_URL, $full_url);

  // Sets the return options of the cURL to return the actual result from the curl request, and FALSE on failure
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

  // Sets the $output variable to the result of the curl
  $output = curl_exec($ch);

  // Close curl resource to free up system resources
  curl_close($ch);

  // Send the API output to the php page
  echo "API response is: " . $output;
?>

Example Response

Call Connected