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

258
Visualizações
send hidden variables through link node.js

I have this code:

client.messages.create({
                    to: clientPhoneNumber,
                    from: 'mynumber',
                    body: 'hello ' + clientName + ', your training session begins in 24 hours. To cancel your session anytime within the next 24 hours, click here: http://localhost:3000/cancelevent?eventid=' + eventID + ''
                }, function(err, data) {
                    if (err) {
                        console.log("err: " + err)
                    }
                    console.log(data)
                });
  

and then it sends then the text message. However, to be honest, it looks ugly for the user. Is it possible to send them the same link but instead hide the ?eventid=' + eventID + '' part of it? It may be an odd question but thanks for the help!

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

0

for anyone in the future that may need this as a reference, I used tinyurl

you can install it for node.js:

npm i tinyurl

then what you can do is use it simply like so:

    let eventID = "0987654321"
  let url = "http://localhost:3000/cancelevent?eventid=" + eventID + ""
  var TinyURL = require('tinyurl');

    TinyURL.shorten(url).then(function(res) {
      console.log(res)
  }, function(err) {
      console.log(err)
  })

and there you have it, simple url shortner!

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