Please log in to get a personalized configuration!
This method will, given a license key, generate a new access token that is locked to that particular key and return the Id of that key. The scope of the
access token is preserved (i.e. all methods that were enabled in the access token used to access this method will be copied to the new access token)
except for the key lock, which is going to be changed to the id of the license key. Note, for this method to work, the access token used to access this method has to have key lock set to
-1 or smaller. All of these details are described in Remarks.
This method is accessed by https://api.cryptolens.io/api/auth/KeyLock
the product id
|the serial key string
|optional. by default, it's 1.
|The id of the license key (i.e. not the key string).
|The new Access Token.
|This is either 0(=success) or 1(=error).
The message that provides additional information about the result.
If it's a successful result, null will be returned.
Otherwise, in case of an error, a short message will be returned describing the error.
- The access token has to have the Key Lock set to -1 or smaller
for this method to work.
- This method does not require any explicit permission. If the Key Lock set to -1 or smaller
this method will be enabled.
- The new access token will have the same permission on the methods.
Only the Key Lock will be changed from being -1 to the KeyId of the
given key (in the input parameters).
- The access token cannot be retrieved after generation. Please make sure to store
it inside the app to avoid generating a new access token.
The value of the KeyLock specifies the expiration date of the new access token, i.e. -1 will set the expiration to 1 day
from the time the access token was generated. Similarly, setting it to -2 will set the expiration date 2 days from the time of the request.
|The Key Lock has to be set to '-1' for this method to work.
|Could not find the product.
|Could not find the key.