• Resolved maxi07

    (@maxi07)


    Hello there,
    first of: I love your plugin. It is really simple to use, but I am experiencing a strange thing.

    When activating a license via REST API, everything works fine and the activated count increments. But when the maximum of activations is reached (2/2), the API returns the http status code 404: Not found. This is strange, as I would have expected to have the license key data object returned with the success value of “False”.

    I am looking forward for your opinion / feedback.

    Thanks,
    Max

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter maxi07

    (@maxi07)

    UPDATE: Same thing happens, when deactivation is not possible (0/2 activations).

    Hello @maxi07

    thank you for your message and for using my plugin.

    As I said in the previous topic, I want to change the license activation in the future v3 API.

    First thing, I want to return a different status code when the activation/deactivation is not possible. I’m thinking of 405 – Not Allowed

    https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405

    The body would then also change. Success would be false, accompanied with an appropriate error message.

    I also want to introduce an arbitrary “meta” field, which will allow you to set meta fields for licenses (Activation unique ID for example). Along with that, I am looking to improve the aspect of additional data validation before a request proceeds. This means, that you’ll be able to write your own code and hook it into the REST API code as an additional check.

    Let me know if I can help with anything else.

    Thread Starter maxi07

    (@maxi07)

    Hey @drazenbebic
    thanks for the reply. This absolutley makes sense.

    Also, I like the idea of meta fields. For example, it would be great if you could send an machine-id with the activation and check, if the license already has been activated for that machine-id. If you need any inspiration, feel free to reach out.

    Max

    Hello @maxi07

    thank you for your reply.

    Yeah, the meta stuff only makes sense if there is a way for developers to hook into the activation code itself and perform additional checks which they need to do, so that activation can be denied under special circumstances.

    It’s a bit wonky in the v2, but I’ll definitely address this in the v3 API. I’ve also been thinking about adding a feature to log the activations/deactivations, along with other data like user agent, IP address, domain, etc.

    Any ideas and suggestions you might have are most welcome!

    I’ll also close this topic, as it seems that we’ve reached a conclusion on what needs to be done.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘When activation via API fails, the plugin returns the status 404.’ is closed to new replies.