Tools to Capture and Convert the Web
GrabzIt's Online Community

Image File Download

Ask questions on how to capture or convert web pages or HTML into images, CSV, PDF or DOCX documents as well on how to convert videos into animated GIF's using our API.

Hello,

 

I am using REST API and I have converted the file and I am getting the response of the POST as file name = 123456.jpeg

I want the URL of the file to push to my server, as I am running the REST API remotely.

Can you assist me with the URL of the output generated file?

 

Thanks & Regards,

Ramu

Asked by Ramu Angappan on the 28th of May 2021

Hi,

As it says in the documentation you should not be using the REST API in the client side as it will expose your application key. The capture is returned in the HTTP response so you just have to save it. You should not be using the URL's that GrabzIt uses as these are short lived as we don't store captures for long.

However if you want to load it in the browser and then save it on the server I recommend using the JavaScript API and one of the server side API's there are examples on how to do this.

Kind Regards

Answered by GrabzIt Support on the 28th of May 2021

Thanks for quick response but the problem is the data is stored in zoho and I need to pass HTML data from it only.

They have their own coding language to invoke url 

when using their function I get a response from Grabz.it as 1254367.jpeg only.

 

Zoho invokeurl link :- Link

Answered by Ramu Angappan on the 28th of May 2021

That's not our software so you would need to ask Zoho.

Answered by GrabzIt Support on the 28th of May 2021

Ok, we'll check with them, IS there a way to get that short lined URLs from the response I get? I can push that URL to my Dropbox account and serve it there as an image document

Answered by Ramu Angappan on the 28th of May 2021

You could use the export functionality but you would also need to use a callback handler.

Answered by GrabzIt Support on the 28th of May 2021

I tried the below Rest API link for export

"https://api.grabz.it/services/convert.ashx?key=xxxxxx&export=dropbox%3A%2F%2F&customid=123&html=<html><table id ="customers"><tr><th colspan=3>Retails Month Till Date - 28-May-2021</th></tr><tr><td>BATTERY</td><td>109.0</td><td>79134.86</td></tr><tr><td>CYCLES</td><td>199.0</td><td>949866.77</td></tr><tr><td>LUBRICANTS</td><td>8.0</td><td>1627.04</td></tr><tr><td>TUBE</td><td>10.0</td><td>1370.0</td></tr><tr><td>TYRE</td><td>22.0</td><td>13652.0</td></tr></table></html>&css=#customers {font-family: Arial, Helvetica, sans-serif; border-collapse: collapse; width: 100%;} #customers td{ border: 1px solid #ddd; padding: 8px; text-align:center} #customers tfoot { border: 1px solid #ddd; padding: 8px; } #customers tr:nth-child(even){background-color: #f2f2f2;} #customers tr:hover {background-color: #ccc;} tr.d4560 { background-color:yellow; color:red; font-weight: bold ;} tr.d4560:hover {background-color: #ccc;} tr.d30 { background-color:pink; color:black; font-weight: bold ;} tr.d30:hover {background-color: #ccc;} td.pym3 { background-color:#87cefa; color:black; font-weight: bold ;} #customers th { padding-top: 12px; padding-bottom: 12px; text-align: left; background-color: #4CAF50; color: white; text-align:center;}"

But it's not saving the file to Dropbox and I am still getting the file only as a response.

 

Answered by Ramu Angappan on the 28th of May 2021

If you are converting HTML all the variables have to be posted. If you make that call in your browser you will see the error. Also as I said you would need a callback handler otherwise you won't know what the exported file refers to.

Answered by GrabzIt Support on the 28th of May 2021