Saving a file from an API response

I make a request to a third party API and get an audio file (not a link) in response. How can I save this file to the backendless server? In codeless mode, I see options with saving a file from another API by URL only.

Hello, @Konstantin_Brumm

When you retrieve an audio file as a Blob from an API request, you can use a Create File block and pass your blob to file content property.


Hello, @Serhiy_Melnychuk
Thank you for the answer.

I get an audio file in mp3 format. Can I save the file in this format?

Hi @Konstantin_Brumm

It will be very helpful to see what response you get

Hi, @Zahar_Mychka

Sure. I make a request to the OpenAI Text-to-speech API.

If I make my request in Postman, I get an audio file in response.

If I make a request through Backendless, I get a some code in response.

But if I create a file with the code, it doesn’t play.

Hello @Konstantin_Brumm

You need to change the encoding to List of Bytes, as shown in the screenshot below.

If you store it as text, it won’t be encoded correctly.

Hello, @sergey.kuk
It works. Many thanks for the support.