Validate license key before installation

Daniel-Doggy

Verified User
Joined
Nov 16, 2019
Messages
452
Hello everyone,

I am currently working on a script to completely automate the installation/deployment of DirectAdmin for my use cases.
One thing that happens somewhat regulary is that I forget to add a new server IP to my list of allowed IPs on my license.
When the license is not allowed for that server, it completely breaks the install script from DirectAdmin. (And thus in turn mine as well.)

So my question is if there is an API from DirectAdmin that I can use via bash/curl to check if a given license key is valid and if it can be used by the server that checks if the license key is valid.

Thanks in advance.
 
Hello,

You might try this one:

Code:
curl --silent --location https://www.directadmin.com/clients/my_license_info.php

from a server for which you want to check a license. Or you use one: https://license.directadmin.com/


And check this: https://forum.directadmin.com/threads/is-there-a-directadmin-client-account-api.67604/#post-359394 for Client Area API.
Thanks for the info.

Sadly after trying I found out that I cannot use this method as our server IPs are not connected to our license since we use a multi-server license so that I can use one license key for all my servers wich causes the API to always say that there was no license found for my server IP.

EDIT:
I use the IP lock feature to only allow my servers to use my license key.
 
Back
Top