About us Rates FAQ Contact
THE WORLD'S LEADER IN CALLER ID SPOOFING
API Documentation
Introduction

This document is intended for users who want to develop applications that make use of our PSTN or SMS gateway.

The SpoofTel API is provided for free to all users who wish to utilize it in order to make calls or send SMS messages through their applications. In order to use the SpoofTel API, you need a SpoofTel account which is used to validate you in order to place calls or send SMS messages.

Currently only caller ID spoofing is permitted through our API, SMS spoofing will be added in the near future.
  Getting Started - Step 1

Step 1 - Register an account with SpoofTel Ltd.

- Visit http://www.spooftel.com/
- Click on the "Sign Up" button located on the right hand column.
- Fill out the registration form in order to continue.
- Be sure to enter in a valid phone number we can call you back at. We use this to send you a verification PIN number you enter into the site.

  Getting Started - Step 2

Step 2 - Get activation PIN

- Click on "Get My Activation PIN" in order to initate a call.
- When the number you entered in the previous step rings, pick up and listen for your 4 digit PIN number.
- When you have your 4 digit PIN number, click on "Continue" and enter that number into the site.

After successfully entering in your four digit activation PIN you will be prompted to enter in your username and password you signed up with in order to log into the site. With your username and password you are ready to POST data to our API.

Basic Commands

In order to start a call or send an SMS message, SpoofTel will need to authenticate you as a valid user. To do this we require a valid username and password passed in all requests made to the API.

API Location: https://www.spooftel.com/API/doCall.php
Please ensure you send all data via SSL ("HTTPS" not "HTTP") as data sent unencrypted can be intercepted and potentially put your account at risk!

Output for the API is displayed in XML for easy reading by multiple application platforms.


Name Parameter Short Description Restrictions
User Name
userName Valid SpoofTel user name. Alphanumeric, underscore and between 4 to 19 characters.
Password password Account password. Alphanumeric, underscore and between 4 to 19 characters.
Record Call tapeCall Record call flag. Set to "Yes" to record the call
Voice Change Pitch voiceChange Change pitch of caller to pitch specified. "-5" to "5". -5 for Female 5 for Male.  0 for no change.
Destination Number Country Code tocountrycode Destination number country code. Country Code of destination number. No "001" prefix or leading "+" symbol should be used.
Destination Number targetNumber Number to call. A valid format number between 5 - 15 digits.
Source Number Country Code fromcountrycode Source number country code. Country Code of source number. No "00" prefix or leading "+" symbol should be used.
Source Number fromNumber Source number. A valid format number between 5 - 15 digits.
Caller ID Number callerIDNumber Caller ID Number to display for call. Numeric digits only 0 " 15 digits in length.
Caller ID Name callerIDName Caller ID Name to display for call. Alphanumeric, Underscores and spaces allowed. 0 " 15 characters.
Callback URL callbackurl URL to send call detail records when call is finished. Must be a valid domain or IP address without HTTP://.
Eg: www.spooftel.com/callback.php
Time Limit timelimit Amout of seconds until the call is hungup. Numeric only, cannot exceed your balance.
Custom custom A user defined variable. Alphanumeric, Underscores and spaces allowed. 255 character max.

API Error Codes


These error codes are generated when our API detects problems with your submission.
All output is displayed in XML format for easy parsing.

ERROR 100: System error. Please try later.
ERROR 200: $result //invalid user input to/from or caller ID number/name
ERROR 201: Blank userName received.
ERROR 202: Blank password received.
ERROR 300: You do not have enough funds to make this call. Please purchase.
ERROR 400: Your account is suspended.
ERROR 500: Service unavailable.
ERROR 600: You have a call in progress.


PHP Example Code


Here is an example using PHP to POST data to our API. The example below is using the account "freecall" which can be used for testing.
<?php
  
//Variables to POST
  
$userName "freecall";
  
$password "freecall";
  
$fromcountrycode "1";
  
$fromNumber "6045551111";
  
$tocountrycode "1";
  
$goingnumber "6045552222";
  
$toShowID "6045555555";

  
//Set this to your URL that you want the call details sent to.
  
$callbackurl "www.example.com/callback.php";

  
//Set the time limit of this call in seconds.
  
$timelimit "60";

  
//Set this to any alphanumeric value
  
$custom "testcall-1234567890";
  
  
//Initialize CURL data to send via POST to the API
  
$ch curl_init();
  
curl_setopt($chCURLOPT_URL"https://www.spooftel.com/API/doCall.php");
  
curl_setopt($chCURLOPT_HEADER1);
  
curl_setopt($chCURLOPT_RETURNTRANSFER1);
  
curl_setopt($chCURLOPT_POST1);
  
curl_setopt($chCURLOPT_POSTFIELDS"userName=$userName&

password=$password&
fromcountrycode=$fromcountrycode&
fromNumber=$fromNumber&
tocountrycode=$tocountrycode&
targetNumber=$goingnumber&
callerIDNumber=$toShowID&
callbackurl=$callbackurl&
timelimit=$timelimit&
custom=$custom"

);
  
  
//Execute CURL command and return into variable $result
  
$result curl_exec($ch);
  
  
//Do stuff
  
echo "$result";
?>

PERL Example Code


Here is an example using PERL to POST data to our API. The example below is using the account "freecall" which can be used for testing.
#!/usr/bin/perl
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
use Digest::MD5 qw(md5 md5_hex md5_base64);

#Optional for creating custom field.
$timeDate = localtime(time);
$data=$timeDate.$userName;
$custom=md5_hex $data;

#Set variables for POST
$userName="freecall";
$password="freecall";
$tocountrycode="1";
$targetNumber="6045551111";
$fromcountrycode="1";
$fromNumber="6045552222";
$callerIDNumber="5556664444";

#Set this to your URL to receive the
#Call details once the call has ended.
$callbackurl="www.example.com/callback.php";

#Limit the call time in seconds
$timelimit="60";

#Use LWP to POST data to SpoofTel API
$ua=LWP::UserAgent->new();
my $req= POST 'https://www.spooftel.com/API/doCall.php',
[userName=> $userName,
password=>$password,
tocountrycode=>$tocountrycode,
targetNumber=>$targetNumber,
fromcountrycode=>$fromcountrycode,
fromNumber=>$fromNumber,
callerIDNumber=>$callerIDNumber,
callbackurl=>$callbackurl,
timelimit=>$timelimit,
custom=>$custom];
$content=$ua->request($req)->as_string;

#Return POST response and display
print $content;

PHP Callback URL example

<?php
  
//Get POST data
  
$inUserID addslashes($_POST['userName']);
  
$fromInput addslashes($_POST['from']);
  
$toInput addslashes($_POST['target']);
  
$callerIDNumber addslashes($_POST['callerIDNumber']);
  
$billedseconds addslashes($_POST['billsec']);
  
$ratePerMinute addslashes($_POST['rate']);
  
$callRecorded addslashes($_POST['callrecorded']);
  
$voiceChanged addslashes($_POST['voicechanged']);
  
$custom addslashes($_POST['custom']);
  
  
//Do stuff
  
echo "Received call details for $custom";
  
  exit();
?>



User Name
Password
 
Forgot my Password

SpoofTel iPhone app

Free Call Spoof

Personal Spoof Number