Offline activation - can we use license key instead of license ID?

Hi,
The API method /v3/activations/offline-activate has a required parameter of license ID.
https://api.cryptlex.com/v3/docs#operation/post/v3/activations/offline-activate

It looks a little bit illogical, because people can work purely with licence Key…if that method asks for License ID, it means we need to introduce one additional constant in the project…Is there any way to avoid that and stick to licence key everywhere?
Thanks.

Hi,

All api endpoints use resource ids. You don’t have to hardcode anything. You first need to get the license using key, then from the license resource get the license id, and use that in the offline activation endpoint.

Hi @adnan-kamili,

If we give the token permissions to read license, then isn’t it a security risk?

Regards,

Hi Akif,

Personal access tokens are to be stored on server only, never in any client app. You will typically write a server script which will be invoked from your client app, and then the Cryptlex Web API will be invoked from from the server script.