How to Verify Your Callback URL

When you register your App with Rediff Apps, you have created an entry in our database for your App. However, this App is not yet serviceable. As the developer of an App, you need to verify that you are the owner or that you can access and have permissions to develop on the callback URL you specified during the registration process. You can do this by making a call to the Rediff Apps server as per the PHP example given below.

NOTE: While the example is coded in PHP, you can use any language as per your preference, but you need to ensure that you translate the steps in the sample code perfectly.

ALSO NOTE: This code needs to be run just the once when you first register and verify your app. You do not need to verify your app again, unless you change your callback URL.

For all calls that you make to Rediff API, you have to set the HTTP Header field, “Referer”, to the callback URL of your App.

To verify your callback URL using PHP:

  • Copy the following code into a file on your domain.
// Your app's AuthKey
$authkey = '12695948244bac7ac8e2b8021881';
// Your app's AppKey
$appkey = '126265r2ewe333e33e33';
// Your app's name
$appName = 'App1';
// Your app's Callback URL
$appCallbackURL = "";
// The XML to send for authentication
$postForApps = '<?xml version="1.0"?><request><appinfo><authkey>'.$authkey.'</authkey><appkey>'.$appkey.'</appkey><appname>'.$appName.'</appname></appinfo> <requestdetails> <action>authenticate</action><callback>'.$appCallbackURL.'</callback></requestdetails></request>';
// Set the Parameters for the call, and execute it
$curl = curl_init();
$post_data = array("xml"=>trim($postForApps));
$tmp_arr_httpheader = array("Content-type: application/x-www-form-urlencoded","Connection: Close");
curl_setopt($curl, CURLOPT_URL, "");
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_REFERER, $appCallbackURL);
curl_setopt($curl, CURLOPT_VERBOSE, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST,1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
$result = curl_exec($curl);
// View the response of the authentication request
echo $result;
  • Replace the appkey, authkey, and appname in the above code with those of your App's.
  • It is COMPULSORY to specify the 'Referer' field of your request's HTTP Header as your callback URL.
  • Open this file in a browser by accessing it through your domain. You will get a message stating that your App has been authenticated.
  • Go to the Rediff Apps dashboard ( Your newly registered App along with it's current status will be displayed on your dashboard. You will notice that the current status of your App is set to Verified.
  • Congratulations! Now you can integrate the Rediff APIs into your App and test your App in Rediff’s Sandbox.
    note_icon_3.jpgIf your callback URL is incorrect, view the instructions on how to change your callback URL.

CLICK HERE to return to the main Table of Contents.

verifying_your_callback_url.txt · Last modified: 2010/10/20 14:29 (external edit)
Back to top
CC Attribution-Noncommercial-Share Alike 3.0 Unported = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0