Integrate "Verify Purchase" in C#

I’m planing to sell my dotNet Application on Codecanyon. It uses a license key verification (using WooCommerce and the Software Addon).
This is working fine for non-envato customers, however every one who purchases the tool on codecanyon do not get a license from my WooCommerce page automatically.

So that’s why I thought I integrate the “Verify Purchase” API function. However the user needs to auth in the browser to grant access to my app and will then redirected to a web page with the passed acces code. If I open the auth window in my software application I get an error when I try to login, if I open it with an external browser, I do not get the passed access token to make the purchase verification…

Is there anyone who have integrated the Envato API v3 in a C# (dotNet) application yet?
Thanks for helping out!

First and foremost, you should know that you must allow users to authenticate the software with a purchase code. Giving them an option to authenticate over OAuth is only an optional bonus.

For software I would actually recommend that you have the user generate a personal token and enter it into the app. The app can then verify any purchase codes or purchases from them without further input. There are two ways to do this:

  1. Send the personal token to your own remote API so it can verify the license securely.
  2. Embed the verification procedures into the app.

If you’re willing to go with option #1, then you actually don’t need to ask for a personal token from the buyer. You can have a personal token of your own with permissions to verify sales of your items, and simply ask for the purchase code in the app.

Personal tokens can be used like any bearer token, and there’s an easy URL that you can open on the browser with the required checkboxes already selected:

1 Like

HI @baileyherbert

thank you for your fast help. I guess I will go with option 1# then.
Is there a way to test it? Because I do not have a purchase code of my own items obviously.

Thank you!

Nevermind, got it working now. Thank you!

Best regards,

1 Like