ByRSVP
A Thinking Farm Venture
SMS and Email Messaging Solutions
Hot SMS number: 8222 8220
 
Login
Backtrack: HomeSupportAPI Home

XML-RPC Interface

XML-RPC (XML Remote Procedure Call) is a protocol for client-server communication that sends and receives information in XML format over HTTP. It defines a communication mechanism by which applications can communicate with each other. XML-RPC is popularly used as an API in Web Services. XML-RPC is simple, popularly supported in many programming languages, and its calling interface is stable.

The XML-RPC proxy URI for ByRSVP's API is: https://byrsvp.com/RPC2.

The API function names are simply supplied as the XML-RPC function, and the API parameters are supplied as an array of parameter name and value pairs in the XML-RPC call. In the Perl programming language, this parameter array can simply be a hash with the hash key being the parameter name and the hash value being the parameter value.

ASP VBScript Example

ASP VBScript does not internally support XML-RPC calls. However, you can make use of an Open Souce XML-RPC library called XML-RPC for ASP. Download the library package. The actual file that you need is xmlrpc.asp, which you have to put it somewhere on your ASP site. Here is ASP code snippet example for using the API.

<!--#include file="xmlrpc.asp" -->
<%
if NOT Request.form("message") = "" then
    ReDim paramList(6)
    paramList(0)="apikey"

    // Put your API Key in the string below.
    paramList(1)="yourapikeyhere"

    paramList(2)="sendto"
    paramList(3)=Request.form("phone")
    paramList(4)="message"
    paramList(5)=Request.form("message")

    myResp = xmlRPC("https://byrsvp.com/RPC2", "rsvpSendSMS", paramList)
    response.write("<p>Server returned: <code>" & myresp &
                   "</code></p>")
end if
%>

Your API Key will, of course, have to be placed in the above code.

Perl Example

This is a complete example Perl script for sending a SMS message. The API Key will, of course, have to be replaced by a real API Key.

#!/usr/bin/perl

use strict;

use XMLRPC::Lite;
use Data::Dumper;

    my $server = XMLRPC::Lite
                 -> proxy('https://byrsvp.com/RPC2')
                 -> call('rsvpSendSMS',
                         apikey => 'yourapikeyhere',
                         sendto => '91234567',
                         message => 'This is a test message from ByRSVP.'
                         );
    if ($server->fault) {
        print "ERROR: " . $server->faultstring . "\n";
    }
    else {
        print Data::Dumper::Dumper($server->result);
    }
Backtrack: HomeSupportAPI Home
 
Copyright © 2007-2010 by Thinking Farm Pte Ltd · All Rights Reserved
Company Registration No. 200415661G