Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

256
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!