59 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+3 more
ProteusThemes says

To simplify the process of the verifying purchase codes I decided to write a simple shell script. I am a heavy terminal user and this is by far the simplest and fastest way to do.

I though that it might be useful for some of you as well. You can see instructions / download it here: https://github.com/primozcigler/everify.sh

;)

3110 posts
  • Located in Australia
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
  • Helped several times protecting Envato Market against copyright violations
+16 more
dtbaker Moderator says

Looks good! (is that a real purchase code?)

Hey add a user agent like “everify by ProteusThemes” to that curl request. Devs said somewhere that they would like all API requests to have a user agent so apps can be tracked / they don’t get blocked.

Edit: works well :) cheers!

59 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+3 more
ProteusThemes says

Looks good! (is that a real purchase code?)

Hey add a user agent like “everify by ProteusThemes” to that curl request. Devs said somewhere that they would like all API requests to have a user agent so apps can be tracked / they don’t get blocked.

Edit: works well :) cheers!

Perfect!

I’ve added user agent header just as you suggested …

Yes, that is a real purchase code, but I will blur it now :P

3718 posts Community Moderator
  • Helps us moderate the forums
  • Contributed a tutorial on Tuts+
  • Located in Netherlands
  • Made it to the Authors' Hall of Fame
+9 more
Joost Moderator says

Nice work! This is bound to come in handy :)

It seems like a bit of overkill to pipe the entire thing to Python just to clean up the output, but hey, it’s not like it’s a dependency when everyone has it anyway Nevermind, this does appear to be the only proper way to go. My little sed-experiment does not even come close ;)

59 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+3 more
ProteusThemes says

Yes, I tried to google for more ‘native’ approach, but as you said – linux and mac comes with python preinstalled, so it is the easiest option to use it :)

495 posts
  • Has referred 1000+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+8 more
pixelentity says

You could use xml format instead of json to avoid the extra parsing

59 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+3 more
ProteusThemes says

I tried that as well, but it still returns the result in one line. I prefer JSON anyway.

59 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+3 more
ProteusThemes says

Just added the option that the first argument can be provided as the purchase code. If missing, the script will prompt for the input.

$ everify.sh e4e91153-XXXX-4483-XXXX-882ee0686787 # first argument is the purchase code
281 posts
  • Has sold $100+ on Envato Market
BizLogic says

Thanks for sharing!

288 posts
  • Has sold $5,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Located in United States
  • Has been part of the Envato Community for over 1 year
+1 more
themeflame says
Great one. Here’s mine, in Python: (Edited, realized you guys would like to keep it all in one script) http://pastebin.com/jGbnh1n2

Just make your credentials’ file and you’re good to go!

Could’ve used urllib2 to add headers to make it look legitimate, but since it worked okay, I guess it’s not a problem.
by
by
by
by
by
by