API call to reset trial

While testing API calls, I came across the “license-status>Trial Information” API. I did the standard GET call for that and received the expected response

{
    "licenseMode": "Trial",
    "trialState": "AllInDemo",
    "trialSecondsLeft": 4078,
    "expired": false,
    "emergency": false,
    "emergencySecondsLeft": 0,
    "development": false,
    "developmentSecondsLeft": 0
}

Once the trial had expired, I tried a POST instead of GET with the body as

{
    "licenseMode": "Trial",
    "trialState": "AllInDemo",
    "trialSecondsLeft": 7200,
    "expired": false,
    "emergency": false,
    "emergencySecondsLeft": 0,
    "development": false,
    "developmentSecondsLeft": 0
}

To my surprise, the trial was reset.

If the trial has not expired and you try a POST, it responds with a 403 though, so you’ll have to wait till

"trialSecondsLeft": 0

and

"expired": true
5 Likes

Huh. Surprised that worked. I'm pretty sure you aren't supposed to programmatically reset the trial.

Meh.
By definition, if you do it from the web interface, you can do it (documented or not) from the web API. As long as it doesn't allow you to reset early, it's not really a jump around the licensing system. And you can do this from scripting (and have been able to for a long time) :person_shrugging:

1 Like

So, in a non-binding opinion, do you think it would be frowned upon for third party designer VS Code extensions to implement a trial banner and reset mechanism for selected gateways? (Asking for a friend)

This has always been something I’ve questioned the legitimacy of…lol

1 Like

I am not a lawyer, this is not legal advice:

I would probably say it's 'frowned upon' to have a reset button anywhere outside the gateway web UI (note we haven't added one to the designer in all this time) but I don't think there's much harm in a trial status banner (note we have added one to the designer).

6 Likes