Hi, From a Survey123 Javascript, I would like to call an API with the HTTP basic authentication method. This is the requirement from the API supplier:
Authentication
Each request requires authentication, which is performed using the HTTP basic authentication method. The header contains the authentication data in the form "Basic username:password" where the phrase "username:password" is Base64 encoded. Username and password are set individually for each external system.
I have tried with:
var url = `<MyUser>:<myPassword>@branchekataloget.dk/api-gateway/Branchekataloget/products?${parameters}`
xmlhttp.open("GET",url,false);
xmlhttp.send();
But get the answer:
Error in <MyScript>.js : 28:1 Expected token `;'
Hope you can point me in the right direction 🙂