Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

139
Views
How to make a Post request multiple times asynchronously in a Twilio function

I am trying to achieve a functionality to send users(who are waiting in the queue after chat is initiated with a customer care) what number are they in the queue. I am calling an endpoint which gives me a number in the queue of the particular task.

For example, my queue number starts with 10 and gradually reduce to 0.

Furthermore, I want to create a loop/async function that makes the Post(I will change it to get once the functionality is working) request until the queue number is 0.

The functionality I am trying to achieve is in a Twilio function. Below is the code I am working on, right now it only makes the post request ones, but I want to keep updating users about their queue until an agent answers them.


exports.handler = async function(context, event, callback) {

var parameters = {"queueSid" : event.queueSid, "taskSid" : event.taskSid};

const apiPath = 'https://myEndPoint';
const response = await axios.post(apiPath, parameters );
console.log('Response', response.data)

callback(null,response)

};

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!