Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

142
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda