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

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

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