How to add License Activation into Themeforest Theme

Hello Authors,
Most of the premium Theme & Plugin Authors are using validators for their items. so no one can use it twice or get auto updates for items.
Did you do something like this with your item/ s. if yes, please share the method or give some idea to how to do it.
Many Thanks :slight_smile:

This is done using the Envato API. :slight_smile:

Check it out here:
https://build.envato.com/api/

Hi,
I know it’s using Envato API.
but I am not sure how to make a function for purchase key vailed for only one domain.
I meant to say, if you using my item for one domain then you can’t use it any other domain.
is it possible to make any function like this? Also, Is it broken any Envato rules?
And what is the basic structure of the code for making any function like this?
Thanks

There are multiple API endpoints to do this. To let them sign in with their account for verification, you would want to use the /buyer/purchases (“List a buyer’s purchases”) endpoint. To have them enter a purchase code instead, you would use /author/sale (“Look up sale by code”).

You would not include this code in the theme. Instead, you would code this implementation on your own server, and then create your own API which your theme(s) will use for license verification.

Yes, using the endpoints above it is possible. However, the screenshots you posted are incorrect. The license does not limit theme usage to one license per domain - it simply limits it to one license per end product. In some rare cases, a single end product can consist of multiple domains. In many cases, customers will also want to use the theme on a test domain. You’d best be prepared to handle these types of cases.

I posted a sample PHP script in another thread showing how to verify a purchase code:

Many Thanks @baileyherbert :slight_smile:

Don’t want to post self-promotional links in your topic, but we offer a software that automates licensing, so authors can limit the number of installations, block updates, and so on. You can find it under my profile in case of interest.