I am getting the error in the title every time I send a request with to the API.
Hi,
Which API endpoint are you invoking? Please share the sample request.
let apiLink = "https://api.cryptlex.com/v3/activations";
let userHash = crypto.randomBytes(20).toString('hex');
const body = {
"key": "key",
"os": os.platform(),
"fingerprint": "stringstringstringstringstringstringstringstringstringstringstri",
"hostname": os.hostname(),
"appVersion": "0.1.3",
"userHash": userHash,
"productId": "product id "
}
//console.log(body);
let headers = {
'Content-Type': 'application/json'
}
const options = {
method:"POST",
url:apiLink,
body:JSON.stringify(body),
headers:headers
}
request(options, function(error,response,body) {
console.log(response.statusCode)
console.log(body)
if (error) {
console.log(error)
console.log(response)
}
})
This is my request code
I am using the v3 api
It’s not recommended to use the Activation API directly. You must almost always use LexActivator to invoke the activation api.
Nodejs wrapper is already available:
https://docs.cryptlex.com/node-locked-licenses/using-lexactivator/using-lexactivator-with-node.js
I keep getting errors with LexActivator. My javascript code will be all encrypted so I am not worried about people seeing the code. So back to my question, how can I fix this?
What error did you get in LexActivator. Device fingerprinting lies at the core of node-locked licensing. LexActivator generates strong machine fingerprints which prevent key reuse. Without a strong fingerprinting algo you system will be very weak.
In the sample you shared please use the proper values for each field:
https://docs.cryptlex.com/node-locked-licenses/using-web-api