Search…
Application API

Application API Description

Plum offers eight services for its Application REST API:
These API methods are designed to work with inbound phone numbers.

Authentication

All API requests authenticate using HTTP Basic Authentication. Use the same username and password that you use to login to your Dev account.
Most likely, users will be able to use built-in HTTP Basic Authentication, depending on the HTTP libraries available in the programming language they opt to use.
Examples of this for each Method are listed below.
get
https://hosting.plumvoice.com
/ws/application/getASR/{phone_number}
Get ASR Value
Sample Request:
1
<?php
2
3
$login = "<username>";
4
$password = "<password>";
5
$phone_number = "<phone number>";
6
$auth = $login . ":" . $password;
7
$url = "https://hosting.plumvoice.com/ws/application/getASR/$phone_number";
8
9
$ch = curl_init($url);
10
curl_setopt($ch, CURLOPT_USERPWD, $auth);
11
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
12
13
$response = curl_exec($ch);
14
15
curl_close($ch);
16
?>
Copied!
get
https://hosting.plumvoice.com
/ws/application/getTTS/{phone_number}
Get TTS Value
Sample Request:
1
<?php
2
3
$login = "<username>";
4
$password = "<password>";
5
$phone_number = "<phone number>";
6
$auth = $login . ":" . $password;
7
$url = "https://hosting.plumvoice.com/ws/application/getTTS/$phone_number";
8
9
$ch = curl_init($url);
10
curl_setopt($ch, CURLOPT_USERPWD, $auth);
11
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
12
13
$response = curl_exec($ch);
14
15
curl_close($ch);
16
?>
Copied!
get
https://hosting.plumvoice.com
/ws/application/getURL/{phone_number}
Get URL Value
Sample Request:
1
<?php
2
3
$login = "<username>";
4
$password = "<password>";
5
$phone_number = "<phone number>";
6
$auth = $login . ":" . $password;
7
$url = "https://hosting.plumvoice.com/ws/application/getURL/$phone_number";
8
9
$ch = curl_init($url);
10
curl_setopt($ch, CURLOPT_USERPWD, $auth);
11
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
12
13
$response = curl_exec($ch);
14
15
curl_close($ch);
16
?>
Copied!
get
https://hosting.plumvoice.com
/ws/application/getOptionsASR
Get ASR Options
Sample Request:
1
<?php
2
3
$login = "<username>";
4
$password = "<password>";
5
$auth = $login . ":" . $password;
6
$url = "https://hosting.plumvoice.com/ws/application/getOptionsASR";
7
8
$ch = curl_init($url);
9
curl_setopt($ch, CURLOPT_USERPWD, $auth);
10
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
11
12
$response = curl_exec($ch);
13
14
curl_close($ch);
15
?>
Copied!
get
https://hosting.plumvoice.com
/ws/application/getOptionsTTS
Get TTS Options
Sample Request:
1
<?php
2
3
$login = "<username>";
4
$password = "<password>";
5
$auth = $login . ":" . $password;
6
$url = "https://hosting.plumvoice.com/ws/application/getOptionsTTS";
7
8
$ch = curl_init($url);
9
curl_setopt($ch, CURLOPT_USERPWD, $auth);
10
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
11
12
$response = curl_exec($ch);
13
14
curl_close($ch);
15
?>
Copied!
post
https://hosting.plumvoice.com
/ws/application/setASR/{phone_number}
Set ASR Value
Sample Request:
1
<?php
2
3
$username = "<login>";
4
$password = "<password>";
5
$phone_number = "<phone number>";
6
$value = "<ASR to be set>";
7
$params = array("asr"=>$value);
8
9
$auth = $username . ":" . $password;
10
$url = "https://hosting.plumvoice.com/ws/application/setASR/$phone_number";
11
12
$ch = curl_init($url);
13
curl_setopt($ch, CURLOPT_USERPWD, $auth);
14
curl_setopt($ch, CURLOPT_POST, 1);
15
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
16
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
17
curl_setopt($ch, CURLOPT_HEADER, 1);
18
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json", "Content-type: multipart/form-data"));
19
$result = curl_exec($ch);
20
curl_close($ch);
21
?>
Copied!
post
https://hosting.plumvoice.com
/ws/application/setTTS/{phone_number}
Set TTS Value
Sample Request:
1
<?php
2
3
$username = "<login>";
4
$password = "<password>";
5
$phone_number = "<phone number>";
6
$value = "<TTS to be set>";
7
$params = array("tts"=>$value);
8
9
$auth = $username . ":" . $password;
10
$url = "https://hosting.plumvoice.com/ws/application/setTTS/$phone_number";
11
12
$ch = curl_init($url);
13
curl_setopt($ch, CURLOPT_USERPWD, $auth);
14
curl_setopt($ch, CURLOPT_POST, 1);
15
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
16
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
17
curl_setopt($ch, CURLOPT_HEADER, 1);
18
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json", "Content-type: multipart/form-data"));
19
$result = curl_exec($ch);
20
curl_close($ch);
21
?>
Copied!
post
https://hosting.plumvoice.com
/ws/application/setURL/{phone_number}
Set URL Value
Sample Request:
1
<?php
2
3
$username = "<login>";
4
$password = "<password>";
5
$phone_number = "<phone number>";
6
$value = "<URL to be set>";
7
$params = array("url"=>$value);
8
9
$auth = $username . ":" . $password;
10
$url = "https://hosting.plumvoice.com/ws/application/setURL/$phone_number";
11
12
$ch = curl_init($url);
13
curl_setopt($ch, CURLOPT_USERPWD, $auth);
14
curl_setopt($ch, CURLOPT_POST, 1);
15
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
16
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
17
curl_setopt($ch, CURLOPT_HEADER, 1);
18
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json", "Content-type: multipart/form-data"));
19
$result = curl_exec($ch);
20
curl_close($ch);
21
?>
Copied!
Last modified 8mo ago