devot:ee Licenses API for Commercial Developers
The devot-ee.com Licenses API allows developers to request information from their account about licenses they've sold in JSON format via a secure request. This is a simpler version of our Purchased Items API. If you are having trouble connecting (for example, you only get an "Authorization Required" message) please contact us so we can confirm your member account has the proper permissions.
The API expects two things: your API key and your secret key. If you're a developer, your keys can be found on your main member page.
$api_key = "a123ffa2345bfd6ee7f8cfe90c123e5"; // Your devot-ee.com API key $secret_key = "c1b2dd34afa567890a12bacfa34bc5a56df78"; // Your secret key
For a valid login the API returns a JSON array containing the following:
count - (int) items returned by the request licenses - (array) item - Product title purchase_date - Date item was purchased (in YYYY-MM-DD format). order_number - The devot:ee order number license_key - UUID license key customer_name - Customer's screen name customer_first_name - Customer first name customer_last_name - Customer last name customer_email - Customer's email
Below is some sample code (remember to wrap in PHP tags) for you to get started. Please note all the CURLOPT values, including the USERAGENT. Please note there should be no trailing slash on the API URL.
$api_key = "a123ffa2345bfd6ee7f8cfe90c123e5"; // Your devot-ee.com API key $secret_key = "c1b2dd34afa567890a12bacfa34bc5a56df78"; // Your secret key // Create the post string (Key version; recommended) $post = array( 'api_key' => $api_key, 'secret_key' => $secret_key ); // Process $url = "https://devot-ee.com/api/license-keys"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($post)); curl_setopt($ch, CURLOPT_POST, 1); $response = curl_exec($ch); curl_close($ch); echo "<pre>".print_r( json_decode($response), TRUE)."</pre>";
Below is an example of what you might expect to see in the response.
stdClass Object ( [count] => 1337 [licenses] => Array (  => stdClass Object ( [item] => Super Kitchen Sink Add-on [purchase_date] => 2012-10-23 [order_number] => Order #11608 [license_key] => 28626544-b41e-4d54-82db-7e2a1b279c1e [customer_name] => nardbuck [customer_first_name] => Chucky [customer_last_name] => Newbuck [customer_email] => firstname.lastname@example.org ) ) )
Last updated May 7, 2014.