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
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!
I’ve added user agent header just as you suggested …
Yes, that is a real purchase code, but I will blur it now
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
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
You could use xml format instead of json to avoid the extra parsing
I tried that as well, but it still returns the result in one line. I prefer JSON anyway.
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
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.