Envato Api Response Problem

Hi everyone I try to using envato api for fetching some theme’s data. I used token and my php script is working at my localhost. I moved it to live site but it is not working, result (matching data) is coming as zero with all same parameters and same codes. I tried to generate new token, not working. After all I try to use online api tool, it is giving me same result with my live site. I don’t know what I must do, just a wait to work it again? My local script is working still.

Envato Api Result:

You are likely talking about two different issues here. To start, the build.envato.com website was designed a bit odd and requires you to explicitly click a link to log in before any of the demos will work. If you do not click this link, you will get the “no content” issue in your screenshot due to a JavaScript error. See this link for an example of what to click.

Now, onto your live server. You state that the result is coming back as zero – do you mean the request is successful but it has no matching items, or is the entire response blank? Have you printed out the entire raw response to check if the request is coming back properly?

I’m happy to help you sort this out but I will need more information:

  • What library are you using to connect to the API? (curl, request, urllib2, etc)
  • Have you checked the library for an error code to see if the request is failing?
  • What is the HTTP status code returned by the API? (200 is expected).
  • If the status code is 200, what is the raw body of the API response?
1 Like

Thanks for your reply sir, after click a link in your screenshot, try it out working now. I’m using curl library. On my live website this response coming from server:


Ah okay, so it is connecting. I would first suggest that you echo out the URL your code is using to search for items, to make sure it is valid and has the correct search term in it.

1 Like

I think I’m so close to solution :slight_smile:

I’m using theme name to catch true theme. But I don’t know which format will be used for the ?term=$keyword.

If I use rawurlencode to format title
Buzznote – A Responsive WordPress Blog Theme
is becoming that:

I’m using rawurlencode function to convert my string to url parameter format. Can you suggest me which format have to be used?

This is your problem. It decodes to:

Buzznote – A Responsive WordPress Blog Theme

Use html_entity_decode() on the item name before encoding it.


You’re awesome, thanks for all.

1 Like