auth

Checks if a machine ID is authorized to use the license. In plain english, this will check if the computer, or web server, is holding a valid license alias that is authorized to be used by that machine. In the event that your product is sold in single-site or multiple-website licenses, the auth API call is useful to protect your application from running on more machines than specified in the end user license purchase.

Required Parameters

  • code = (string) the license code’s alias.
  • mach = (string) generated ID of the machine that is using the license.

Quick PHP Example

Once a machine has been activated, every once in a while you’re going to want to check if the machine is authorized to use the license that it was supposedly activated with. Below is an example of the code that may run in a check function on your deployed application. GetAlias( ) should be your function that grabs the license alias stored locally, and MachineCode( ) should be a function that generates a code unique only to the machine that is running your deployed software.

$params = array(
	'call'   => 'auth',
	'apikey' => YOUR_API_KEY,
	'code'   => GetAlias(),
	'mach'   => MachineCode()
	);
$result = LicenseAPI($params);

Successful Return String

On success, auth returns a single-character string: “1″.

1

Unsuccessful Return String

0

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

This site is using OpenAvatar based on