94 posts
  • Top Monthly Author
  • Trendsetter
  • Weekly Top Seller
  • Elite Author
+6 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

;)

5441 posts
  • Author Level 11
  • Moderator
  • Winner
  • 6 Years of Membership
+20 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!

94 posts
  • Top Monthly Author
  • Trendsetter
  • Weekly Top Seller
  • Elite Author
+6 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

3875 posts Community Moderator
  • Weekly Top Seller
  • Moderator
  • Tuts+ Instructor
  • Netherlands
+10 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 ;)

94 posts
  • Top Monthly Author
  • Trendsetter
  • Weekly Top Seller
  • Elite Author
+6 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 :)

501 posts
  • Affiliate Level 7
  • Author Level 10
  • Collector Level 2
  • Top Monthly Author
+10 more
pixelentity
says

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

94 posts
  • Top Monthly Author
  • Trendsetter
  • Weekly Top Seller
  • Elite Author
+6 more
ProteusThemes
says

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

94 posts
  • Top Monthly Author
  • Trendsetter
  • Weekly Top Seller
  • Elite Author
+6 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
321 posts
  • 1 Year of Membership
  • Author Level 3
BizLogic
says

Thanks for sharing!

490 posts
  • Author Level 4
  • Collector Level 3
  • Trendsetter
  • 2 Years of Membership
+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