52 posts
  • Author Level 4
  • Collector Level 2
  • Exclusive Author
  • United Kingdom
+1 more
DSThemes
says

Hey,

I’m currently building an asset area on my website that allows users who’ve bought my themes to access content. To access the area I want users to enter their purchase code that comes with the theme. This uses the Envato API to validate the code and allow access.

However, I’m struggling to test the login process without having to buy my own theme to provide me with a valid purchase code.

Having contacted support they have told me I need an “example JSON response object” which would mean I wouldn’t need a purchase code. Support mentioned if I asked on the forums there might be an author who could help.

Would anybody be able to help me with this?

Any help would be very much appreciated!

Thanks,

DSThemes

3439 posts
  • Author Level 4
  • Collector Level 2
  • Community Superstar
  • United States
+2 more
organicbee
says

there isn’t one, not that I know of. Envato doesn’t seem to care about their API (or allowing authors to test with it as its been brought up before)

what are you trying to do exactly? There are existing libraries that have been tested (I have a WordPress plugin in the repo) As well as other authors with stuff on CC.

Theres also Jeffery Ways php class ( I have a fork that uses WordPress functions in Github as well)

52 posts
  • Author Level 4
  • Collector Level 2
  • Exclusive Author
  • United Kingdom
+1 more
DSThemes
says

Hey – I literally have an input field where the user enters their purchase key, if it’s a valid key, they get access, if not they get an error message.

I could buy one of my own themes to get a key, and take a little hit, but if I can do it without doing this then all the better.

Thanks for getting back so quickly.

3439 posts
  • Author Level 4
  • Collector Level 2
  • Community Superstar
  • United States
+2 more
organicbee
says

Thats what I did…. but Envato has since made a policy where you can’t buy your own items… even to test their API, which they won’t provide sample data for( can you tell that annoys me)

428 posts
  • Helpful Hacker
  • Industrious API Inventor
  • Mo Bro
  • Author Level 5
+4 more
Gewora
says

Hey Buddy,

there you go:

{"verify-purchase":{"item_name":"TubeSaver - The Most Advanced YouTube Downloader","item_id":"5883590","created_at":"Wed Dec 18 21:22:37 +1100 2013","buyer":"XXXX","licence":"Regular License"}}

Have Fun! :)

52 posts
  • Author Level 4
  • Collector Level 2
  • Exclusive Author
  • United Kingdom
+1 more
DSThemes
says

Hey Gewora,

Thanks for that I’ll give it a go!

Cheers guys

428 posts
  • Helpful Hacker
  • Industrious API Inventor
  • Mo Bro
  • Author Level 5
+4 more
Gewora
says

You’re welcome! :)

241 posts Marketplace Developer
  • Collector Level 1
  • Envato Team
  • New Zealand
  • 3 Years of Membership
madlep
Envato team
says

Hey Gewora,

Thanks for that I’ll give it a go!

Cheers guys

Yeah, the documentation around the response JSON for the API is pretty weak. Give me a yell if you need a hand further with it.

428 posts
  • Helpful Hacker
  • Industrious API Inventor
  • Mo Bro
  • Author Level 5
+4 more
Gewora
says


Hey Gewora,

Thanks for that I’ll give it a go!

Cheers guys
Yeah, the documentation around the response JSON for the API is pretty weak. Give me a yell if you need a hand further with it.

You could also just provide a demo purchase code and the associated API key, to give authors a way to test everything out.

428 posts
  • Helpful Hacker
  • Industrious API Inventor
  • Mo Bro
  • Author Level 5
+4 more
Gewora
says

Hey guys,

take a look at this thread if you still need a easy solution.

by
by
by
by
by
by