Is any other way to download the audio response in collection

i have any api end point which is going to translate the text in to speech . for single single language translation i am able to download the response through send and download button ,but i am trying to pass an csv file in a collection runner to run my request but it ll gives the response in an musical symbol format .My problem is i am not able to download that translation as a mp3 format .

Hi @pravinder i was able to download files using newman. If that is ok for you, suggest you to use that.

var i = 0,
fs = require(‘fs’),
newman = require(‘newman’); // ensure that you have run “npm i newman” in the same directory as this file{
collection: require(’./Test.postman_collection.json’),
}, function (err, summary) {
// handle collection run err, process the run summary here
}).on(‘request’, function (err, execution) { // This is triggered when a response has been recieved
if (err) { return console.error(err); }
fs.writeFile(response${i++}.pdf,, function (error) {
if (error) { console.error(error); }

1 Like

Thanks for support . i will check it once and ll getback to you

@pravinder sorry, forgot to mention this. Save this code to a .js file and run the file from cmd using

node test.js
Remember to run npm i newman in the directory where you run the collection.

Hi @jeevananthank
Its not working . i have to run my collection with environment variables .where should i stored all these ?


Hi @jeevananthank
Sorry not able to run . can you please explain me step by step so that i will do accordingly

please see the error list

Hi @jeevananthank,
Thank you for sharing your script. As far as I see, your script is the only way for downloading a pdf file via newman.
How can I pass a Bearer token in your script?
I checked the documentation but could not find a way for it.