50 posts
  • Exclusive Author
  • United Kingdom
  • Sold between 5 000 and 10 000 dollars
  • Has been a member for 2-3 years
  • Bought between 1 and 9 items
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

3192 posts
  • Sold between 5 000 and 10 000 dollars
  • United States
  • Bought between 10 and 49 items
  • Has been a member for 4-5 years
  • Exclusive Author
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)

50 posts
  • Exclusive Author
  • United Kingdom
  • Sold between 5 000 and 10 000 dollars
  • Has been a member for 2-3 years
  • Bought between 1 and 9 items
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.

3192 posts
  • Sold between 5 000 and 10 000 dollars
  • United States
  • Bought between 10 and 49 items
  • Has been a member for 4-5 years
  • Exclusive Author
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)

325 posts
  • Referred between 1 and 9 users
  • Grew a moustache for the Envato Movember competition
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Has been a member for 2-3 years
  • Bought between 10 and 49 items
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! :)

50 posts
  • Exclusive Author
  • United Kingdom
  • Sold between 5 000 and 10 000 dollars
  • Has been a member for 2-3 years
  • Bought between 1 and 9 items
DSThemes says

Hey Gewora,

Thanks for that I’ll give it a go!

Cheers guys

325 posts
  • Referred between 1 and 9 users
  • Grew a moustache for the Envato Movember competition
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Has been a member for 2-3 years
  • Bought between 10 and 49 items
Gewora says

You’re welcome! :)

236 posts Marketplace Developer
  • Envato Staff
  • Envato Developer
  • New Zealand
  • Has been a member for 2-3 years
  • Bought between 1 and 9 items
madlep Dev 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.

325 posts
  • Referred between 1 and 9 users
  • Grew a moustache for the Envato Movember competition
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Has been a member for 2-3 years
  • Bought between 10 and 49 items
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.

325 posts
  • Referred between 1 and 9 users
  • Grew a moustache for the Envato Movember competition
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Has been a member for 2-3 years
  • Bought between 10 and 49 items
Gewora says

Hey guys,

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

by
by
by
by
by
by