activate

Activates a machine to use a license code. This will associate the machine ID with the license.

Required Parameters

  • code = (string) the license code.
  • mach = (string) generated ID of the machine that will be associated with license.

Quick PHP Example

Note that $license_code_input refers to the user-supplied license code. MachineCode( ) should be a function that generates a code unique only to the machine that is running your deployed software.

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

Successful Return String

On success, the activate call’s return result will be a string. This string is the license code’s alias. Your application saves the license alias to securely remind itself that the end user has already activated their copy of your product. Basically, the license alias is used when the application calls the Serial Sense API to check the authenticity of the product activation. Saving the license alias is not required; however, this method–or any other double-check method–is highly recommended for your product security.

If the machine was already activated using the activation code, then the license code’s alias is still returned. Note that the alias cannot be used to activate your product on another machine–the end user must use the activation code to activate the product. Therefore, the license alias is safe to store locally on the machine where the end user activated the product. Save the license any way that is convenient: in a local SQL database, a remote file on your server, the Windows registry, or any other creative technique you can use to retrieve the license alias. License alias example:

CR-3H-7L-021HLO

Unsuccessful Return Strings

  • F = Serial Sense was unable to find the matching license activation code. Therefore, activation has failed. You should ask your end user to re-input and double check that they typed in their input correctly.

  • B = This result is returned when the customer is trying to activate your software on another computer or web server when they have already reached the maximum number of machine installs permitted. In short, the License Maximum Machine IDs for their license activation code is already at the capacity you set. Incase you’re wondering, “B” is short for telling your end user, “Buy More!”

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