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
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