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

149
Visualizações
Messagebird API - not recieving SMS texts

I'm following the Messagebird docs on sending an SMS through the messagebird API. When I run my app and go to the link in postman, I get no errors and "SUCCESS" is console.logged as well as the reponse. However I never recieve a text. When I go to the SMS logs on the messagebird dashboard there's nothing there except for the test SMS I sent rhough the messagebird dashboard

I've replaced my number for privacy purposes but there was no issue regarding the number being invalid

router.get("/testSMS", (req,res) => {
    messagebird.messages.create({
        originator : 'Movie App',
        recipients : [ '123456778' ],
        body : 'Hello World, I am a text message and I was hatched by Javascript code!'
     }, function (err, response) {
        if (err) {
           console.log("ERROR:");
           console.log(err);
       } else {
           console.log("SUCCESS:");
           console.log(response);
       }
    });
})

Here's my console enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

This example works for me. If you add your number as a query param does this work for you?

router.get("/test/:phone", (req, res) => {
  const { phone } = req.params;

  // Ensure the phone nubmer follows the E.164 format (https://www.twilio.com/docs/glossary/what-e164)
  if (!/^\+[1-9]{1}[0-9]{3,14}$/.test(phone)) {
    return res.status(400).send("Invalid phone number");
  }

  // Sends a test SMS to the number specified in the request
  messagebird.messages.create(
    {
      originator: "MessageBird",
      recipients: [phone],
      body: "This is a test message from MessageBird",
    },
    (err, response) => {
      if (err) {
        return res.send(err);
      }
      return res.send(response);
    }
  );
});
about 4 years ago · Juan Pablo Isaza Relatório
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