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

128
Views
curl with variable in url using javascript gets me error
var Cname = "test";
var Cphone = "01022223333";
var getSynoLink = "curl --location --request GET";
getSynoLink += " 'https://test.synology.me:9005/webapi/entry.cgi?api=SYNO.FileStation.Sharing&version=3&";
getSynoLink += "method=create&";
getSynoLink += "password=" + Cphone + "&";
getSynoLink += "path=/E-MAIL/"+ Cname + "_" + Cphone +"'";
getSynoLink += " -H 'Cookie: id=1233456454121'";

I am trying to create sharing link on synology nas using synology api. Everything works great except the password part. I am setting password from Cphone(customer's phone number).

So far it creates link but if I put password, says incorrect.

I've tried,

 getSynoLink += "password=01022223333&";

But it comes with incorrect password.

getSynoLink += "password=world&";

If i put string like "world" it works.

As of synology api document,

Optional The password for the sharing link password when accessing it. The max password length are 16 characters. String

I guess it is problem of numbers and string.

But its doable on GUI interface.

I've tried

var Cphone = "01022223333";
var Pass2 = Cphone.toString();
var Pass1 = Cphone + "";
var Pass = String(Cphone);

ended up with no luck.

please help me...

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

01022223333 must be quoted, otherwise it is treated as the numeric value 1022223333 or even the octal representation of the decimal value 139011803.

getSynoLink += "password=%22" + Cphone + "%22&";
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!