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

125
Visualizações
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 Respostas
Responde à pergunta

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