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

257
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
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