Posts by UBLThemes

689 posts
  • Affiliate Level 3
  • Author Level 6
  • Beta Tester
  • Collector Level 4
+5 more
UBLThemes
says


Whats going on with the API for those of us that use outside support sites? Is a new field going to be added for expiration or?

Hi contempoinc,

I put out a release notice a couple of days ago regarding the changes to the API. Check it out.

Yet the new support options in the new API are useless!

User inputs their product key into your site and it checks it and returns false because its checking the buyers and not the authors authorisation.

689 posts
  • Affiliate Level 3
  • Author Level 6
  • Beta Tester
  • Collector Level 4
+5 more
UBLThemes
says

When I tried to get account info with following code
curl -H "Authorization: Bearer c0lQ2WLYW9qAZ9RH12cH1fJPzVWSscXP" https://api.envato.com/v1/market/private/user/account.json
I got only
?VJ-*?/R?R
-N-?K?MUH?K??/Rp
                ?T?N?T??+K??L?S?QJ?OI???/?O,-?H?+?LN,IMQ?O3?G
Maybe someone could give advices about new API? P.S. Access Token is correct and not expired

I got the information to work on this for me by using roughly the same code as above but with the account api url instead

689 posts
  • Affiliate Level 3
  • Author Level 6
  • Beta Tester
  • Collector Level 4
+5 more
UBLThemes
says

Try to use following code https://www.snip2code.com/Snippet/524199/test-envato-api-oauth-for-UBLThemes

Hi, and thank you but my code is 100% working :), and is more or less the same as yours apart from my access token is being generated via a different section of my OOP class.

Also your code you showed is not the verifying of products ;)

The Access Token function within the class works 100% as it is working for all other queries.

The API really is not geared for this support on the 1st September, but hey who cares let the authors take the (Put your word here)! After all Envato are only getting 30% of the support packs for doing nothing!!!!!

689 posts
  • Affiliate Level 3
  • Author Level 6
  • Beta Tester
  • Collector Level 4
+5 more
UBLThemes
says

This is a joke, you are wanting to push this out on the 1st of September and still you have not got an api system which can even cope with this…

Still the purchase verification does not work from a self user input.

For instance a user comes on to my support site and in puts their own verification number using the auoth api system.

It returns false all the time because it is checking the app author instead of the client inputting the data.

Guys get your act together please because this is looking highly unprofessional.

I use the following code:

public function verifyItem($accesstoken, $clientid, $itemcode){

    $bearer = 'Bearer ' . $accesstoken;    
    $header = array();
    $header[] = 'Content-length: 0';
    $header[] = 'Content-type: application/json';
    $header[] = 'Authorization: ' . $bearer;

    $veriurl = 'https://api.envato.com/v1/market/private/user/verify-purchase:'.$itemcode.'.json';
    $ch_veri = curl_init($veriurl);

    curl_setopt($ch_veri, CURLOPT_HTTPHEADER, $header);
    curl_setopt($ch_veri, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch_veri, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch_veri, CURLOPT_CONNECTTIMEOUT, 5);
    curl_setopt($ch_veri, CURLOPT_USERAGENT, $clientid);

    $cinit_veri_data     = curl_exec($ch_veri);
    $veri_data     = json_decode($cinit_veri_data, true);

    curl_close($ch_veri);

    if(empty($veri_data['verify-purchase'])){ 

        return false;

    } else { 

        return $veri_data['verify-purchase'];

    }

}

Please do not ask me to use a personal token when I am needing a oauth token for most of my queries.

To make people get a personal and a oauth is simply mad.

You would never see Twitter, Facebook, Google or any other well known companies make you get multiple tokens to access a small per portion of data.

Also just recently I have been getting an error which is: “Forbidden: Token not found or expired” when using the code above which has never happened in the past.

Having checked the code the bearer token is being passed through and its the latest token that was given just 1 second before.

Thanks

UBL Themes

689 posts
  • Affiliate Level 3
  • Author Level 6
  • Beta Tester
  • Collector Level 4
+5 more
UBLThemes
says

This things show how much Envato cares. Asked a question a week ago, flagged the posts about 10 times for a staff reply and yet no dev replied. That’s a shame!

I asked this question well over a month ago if you look back!!!

I never once got an answer…

They want to implement support packs and make it mandatory but do not want to give us any structure to do it, even though they are taking 30%...

Shows how professional they really are!

689 posts
  • Affiliate Level 3
  • Author Level 6
  • Beta Tester
  • Collector Level 4
+5 more
UBLThemes
says

Hi there has had lots of questions over the last week or two, and just one answer in two weeks.

This thread started promising with developers and staff answering as much as possible.

Then all of a sudden you can see a desert bush rolling across the forum thread these days, since this thread has been abandoned from Envato.

I need to know when this old api is being disbanded as this new one is not good enough yet.

Also if you are planning to wait I hope you will give sufficient time to alter our support sites before killing the first api.

Any ideas when the OAUTH with be able to verify the purchase.

I can understand not developing the support packs into this system yet because that is not finalised yet, but the purchase verification is one of the most important things for the OAUTH for developers who have support sites.

This one thing alone has halted my progress for my support site. like a 43 stone (273kg, 600lbs) man in a 1 metre wide corridor

Thanks

UBL

689 posts
  • Affiliate Level 3
  • Author Level 6
  • Beta Tester
  • Collector Level 4
+5 more
UBLThemes
says

Can anybody from Envato comment on when we’ll be able to use the API to retrieve the buyer’s purchases specific to an author without the user having to generate tokens or providing their api keys?

I’m looking to change a few things into my support platform so i’d like to know a possible ETA ?

Thank you.

Ive asked this a few times with no joy.

If the database was developed correctly then it should be simple to achieve yet they have not come with a solution yet.

Or if they have they have not announced it, maybe testing it?

I have noticed that since the API went offline for a few hours no-one has commented since.

Wondering if the API was abused?

689 posts
  • Affiliate Level 3
  • Author Level 6
  • Beta Tester
  • Collector Level 4
+5 more
UBLThemes
says

I have a few more issue.

At the moment we have to create a few apps because we need to return to a few urls within the site, cant you allow more than 1 url to be input on the return urls as this is making us create multiple apps.

Either that or we have to make the person sign in every hour which is not the ideal solution.

Also at present the oauth can not verify purchases from the buyer with their own verification code.

For instance if the user is logged in and submits his own verification code, it returns false because the verification code is meant to be submitted via the author and this at present can not be achieved using the oauth version of this:

https://api.envato.com/v1/market/private/user/verify-purchase:verification-code-goes-here.json
689 posts
  • Affiliate Level 3
  • Author Level 6
  • Beta Tester
  • Collector Level 4
+5 more
UBLThemes
says

Hi I have found an issue or at least I can not find anything which resembles the problem.

If a user changes his/her name on Envato is a new purchased verification generated?

For instance my support site is 100% dependant on Envato’s API so it checks the username and checks if the user is within the database, if the name is not there it then creates a new user.

Now if a user has changed his/her/their name then it will create a new user account which can be a little bit of a pain for the person who is trying to look at his/her/their past tickets.

Is there a way of looking at their past usernames, and also state that this person has changed their name.

For instance on this:

https://api.envato.com:443/v1/market/private/user/account.json

It brings back the following:

{
  ["image"]=> "https://0.s3.envato.com/files/89625911/gravatar.png" 
  ["firstname"]=> "XXXXXX" 
  ["surname"]=> "XXXXXX" 
  ["available_earnings"]=>  "90999099.99" 
  ["total_deposits"]=> "0.00" 
  ["balance"]=>  "90999099.99" 
  ["country"]=> "Land Of Mars" 
  ["past_names"]=> "Land Of Mars" 
}

can you not have list of old names, and date of change?

Something like this:

{
  ["image"]=> "https://0.s3.envato.com/files/89625911/gravatar.png" 
  ["firstname"]=> "XXXXXX" 
  ["surname"]=> "XXXXXX" 
  ["available_earnings"]=>  "90999099.99" 
  ["total_deposits"]=> "0.00" 
  ["balance"]=>  "90999099.99" 
  ["country"]=> "Land Of Mars" 
  ["past_names"]=> [
  {
      ["username"]=> "OldUser" 
      ["changed_date"]=> "12-27-2013" 
  },
  {
      ["username"]=> "OldUser2" 
      ["changed_date"]=> "06-19-2014" 
  },
  ]
}

This way we check if the user is present and if it is not, then check its old username and check the database, then we can assign the new username to the old username which will stop complaining customers.

Else there are 2 issues, old verification tickets will fail, and it will make clients lose old tickets, forum posts.

689 posts
  • Affiliate Level 3
  • Author Level 6
  • Beta Tester
  • Collector Level 4
+5 more
UBLThemes
says

Trying to get an image via the api but can’t get it too work, as it’s in a 3 layer part e.g.

previews > thumbnail_preview > small_url

My code is:
echo '<img src="',$json_data['matches'][$i]['small_url'],'" alt="',$json_data['matches'][$i]['name'],'" />';
but also tried:
echo '<img src="',$json_data['matches'][$i]['previews'][$i]['thumbnail_preview'][$i]['thumbnail_url'],'" alt="',$json_data['matches'][$i]['name'],'" />';

I am probably missing something simple, I am able to get the data out that’s in a first “layer” e.g. the ID, the Name etc just need to be able to get the image url.

Any pointers will be appreciated.

Hi I dont know without looking at the actual full code but you are using a comma instead of a full stop which will cause conflict anyway.

Dont know if that typo is just for this or if it was a copy and paste from the direct code.

For instant you have:

echo '<img src="',$json_data['matches'][$i]['small_url'],'" alt="',$json_data['matches'][$i]['name'],'" />';

Instead of:

echo '<img src=".$json_data['matches'][$i]['small_url'].'" alt="'.$json_data['matches'][$i]['name'].'" />';

have you tried just dumping the information to see where everything sits within the api.

For instance:

var_dump($json_data);
by
by
by
by
by
by