Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

146
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda