Envato API get /buyer/purchase not working?


#1

Hello All,

I used API in my code but it seems “get /buyer/purchase” not working…
Also I used “get /buyer/download” and ir work as well

is there any problem here?


#2

Simply saying “it does not work” is not going to get you an answer.

You have to tell which code the API returns, any other debugging errors, etc.


#3

Yes you’re right!

it return some scrambled chars same as below before using json_decode
means : $json = curl_exec($curl);
�M�A 1�᫄�U]��k)m�aƦ&�����ro�����*� �=Oo��� 2H��t��X)e��ex�+�,�����e��c�ug�pv�K�X���2�����oܡ��t+R ��x�������

and return NULL after using json_decode
means : $response = json_decode($json);

I’m sure my codes are correct because I can receive download link of product with same code


#4

looks like a charset issue.

would you mind sharing whole page? (not code, page)


#5

Add

curl_setopt($yourhandle, CURLOPT_ACCEPT_ENCODING, “”);


#6

not working …
Also I added curl_setopt($curl, CURLOPT_ENCODING, ""); but still no success!


#7

no one can help ?


#8

I used this git for my codes