Unable to download mutipart form data from Third Party API

Hi Team!

I hope you are doing well!

Actually, I am trying to download multipart form data from the Third Party API. But I am unable to download the file data. I have tried this in some other ways that I have listed below

  1. Request API(Frontend)
  2. Server Method Invocation(Backend)

Request API:
Unable to establish the connection between Freshdesk and Third Party API

Server Method Invocation:
Able to get binary data in the backend, but get a Timeout error in frontend

Please help me out on how to overcome this

Hi @Saravanakumar_Raju,

From the Third-party API side, I get that the response is in binary(?). In that case, Request API may not be the best fit as it only deals with responses of type - String, JSON, or XML.


In the case of serverless, I see that you have made use of SMI along with Axios/request npm. If you were to invoke the call from the frontend, it has to finish within 5s. If not, It will end up in a timeout. And again. SMIs can return only JSON - making it near-impossible to build the use-case solely within the platform.

At this point, one of the feasible approaches would be to have a middleware server that downloads the file from the third-party API, generates a link, and shares it to the custom app. The generated link has to be signed & short-lived thus making it only accessible to an intended requestor.

An alternate approach is to see if the third-party has any sort of Document Management System (DMS) integration in place. Certain DMS have APIs that facilitate file sharing by default.

Also, please feel free to share some details about the third-party API that you are trying to use. It will definitely help us understand your situation

1 Like

Hi @Hem!

Thanks for your reply.

I try this app by using a middleware server and get back to you if more help needed.
And, I have shared the Third Party API links through DM.

Have a nice day!

@Saravanakumar_Raju, Hopefully you have solved the problem that is occuring. Do you need any additional help on top of this?

1 Like

This topic was automatically closed after 14 days. New replies are no longer allowed.