SDKs
node.js SDK
License API
26min
provides a direct interface to the licensespring api https //docs licensespring com/license api/ the licenseapi class encapsulates api calls, input checks, authentication and signature verification typescript definitions are provided for the arguments and return types of the class methods to import the licenseapi class use const { licenseapi } = require('@licensespring/node sdk'); creating an instance const licenseapi = new licenseapi({ apikey '12345678 4bfe 4e3a 8737 757004d6294c', sharedkey 'eyuhrlajvivtisfixpxpkhw78f4ewy 00 12345678', appname 'js sdk test 1', appversion '0 0 1', / note the following properties are set to their default values by the sdk and can be overriden manually / // apipath 'http //api dev licensespring com/api/v4', // publickey ' ', }); the constructor takes the a single argument of the following type { / your licensespring api key / apikey string, / your licensespring api shared key / sharedkey string, / custom name for your application / appname string, / custom version string for your application / appversion string, / your air gap activation key (optional) / airgapkey? string, / override for license api url (default is https //api licensespring com/api/v4/) / apipath? string, / override for license api public key (default is pub key for api licensespring com) / publickey? string, / override for license file filename (default is "license") / filename? string, / override for license file path (default is current directory) / filepath? string, / override for license file encryption key / filekey? string, / override for license grace period duration in hours (default is 24) / graceperiod? number, / override for license file guard file (default is false) / isguardfileenabled? boolean, / override for hardware id calculation method (default is 0, for more info see "hardware id" section) / hardwareidmethod? number, } api methods for type declarations see type declarations https //www npmjs com/package/@licensespring/node sdk#types hardware id generates a hardware id https //www npmjs com/package/@licensespring/node sdk#hardware id this value is required for various api method calls if the optional argument is not provided, it defaults to the value set in the configuration object provided when instantiating the licensespringapi object if no value was provided in the config object, it defaults to 0 (the default hardware id method) gethardwareid(algorithm? hardwareidalgorithm) string check license see check license docid\ zh4kfih s59tzibzkeb9o checklicense(payload licenseidentificator, includeexpiredfeatures boolean = false) promise\<licenseresponse> activate license online see activate license (online method) docid\ mt2ygm6cjzh2bumu gfww activatelicense(payload licenseactivationidentificatorwithvariables) promise\<licenseresponse> deactivate license online see deactivate bundle (online method) docid\ nzu6srynqlled2 hhvhr deactivatelicense(payload licenseidentificator) promise\<boolean> activate license offline see deactivate bundle (offline method) docid\ ucxi3f0ly0ysvouqhh8lf activateoffline(payload licenseactivationidentificatorofflinewithvariables) promise\<licenseresponseoffline> deactivate license offline see deactivate license (offline method) docid\ iyg1dxiyqp9vw mlj xuk deactivateoffline(payload licenseidentificator) promise\<boolean> get trial key see trial key docid\ mtanosfyjyxu 2m0ovz a gettrialkey(payload trialkeypayload) promise\<licensetrialresponse> list licenses for user see licenses for user docid\ rp314ys1tvcymb99k7uuv getuserlicenses(payload getuserlicensespayload) promise\<licenseresponse\[]> list license users for customer see list license users for customer docid\ m4gokma1pfwxadk0cglkl getcustomerlicenseusers(payload getcustomerlicensespayload) promise\<customerlicenseusersresponse> check license feature see license feature check docid\ nol8jafp0apia6di6w5vt checklicensefeature(payload licenseidentificatorandfeature) promise\<licensefeatureresponse> add license consumption see add consumption docid\ srwb9sggwhqxqncym3tbi addconsumption(payload licenseidentificatoraddconsumptions) promise\<licenseconsumptionsresponse> add license feature consumption see add feature consumption docid\ vp8t3phttdpq46i9yktff addfeatureconsumption(payload licenseidentificatoraddfeatureconsumptions) promise\<licensefeatureconsumptionresponse> get product details see get product details docid\ ar0igr0c1 dvx1yn044rr getproductdetails(payload productdetailspayload) promise\<productdetailsresponse> get device variables see get device variables docid\ zjvswpdxa3gr 9kiq0gng getdevicevariables(payload licenseidentificator) promise\<devicevariable\[]> track device variables see track device variables docid 9lcvdjjd nsjuu7uibeaa trackdevicevariables(payload licenseidentificatorwithvariables) promise\<devicevariable\[]> borrow floating license see borrow floating license docid\ sooypvnwqodzw1rtwyust floatingborrow(payload licenseidentificatorwithborroweduntil) promise\<licenseborrowresponse> release floating license see release floating license docid\ ac4qjdmmgxwjrzjv9mrru floatingrelease(payload licenseidentificator) promise\<boolean> release floating feature see release floating feature docid\ vysqav5zovsk4lj93xvdi featurerelease(payload licenseidentificatorandfeature) promise\<boolean> change password see change password docid\ b4ixyzvah4talttuuajyi changepassword(payload passwordchangepayload) promise\<boolean> get product versions see get product versions docid\ mbq0ek4xlt jx8sldyhy9 getversions(payload licenseidentificator) promise\<versionsresponse> get product installation file see get installation file docid\ lxpe6kv olj7hll grl1q getinstallationfile(payload licenseidentificatorwithinstallation) promise\<installationfileresponse> get single sign on url see single sign on url docid\ qbjwnphsdcs0l25uw6ptq getssourl(payload ssourlparams) promise<{ url string }> air gapped license code https //docs licensespring com/license entitlements/activation types/air gapped https //docs licensespring com/license entitlements/activation types/air gapped getairgapactivationcode(initializationcode string, licensekey string) string verifyconfirmationcode(confirmationcode string, licensekey string, policyid? string) boolean activateairgappedlicense(activationpayload offlineactivation, licensekey string, policyid string) licenseresponse