Showing results for 
Search instead for 
Did you mean: 
To help support our community and customers during the outbreak of Coronavirus (COVID-19), LogMeIn is providing free Emergency Remote Work Kits for Health Care Providers, Educational Institutions, Municipalities, Non-Profit organizations, and current LogMeIn customers. For more information please visit
New Contributor

API BASIC Authentication Help

I keep getting an authentication error (401) any one see any issues with my code? 

var customerID = 'xxxx'; var clientSecret = 'yyyyy'; var encodedData = btoa(customerID + ':' + clientSecret); var authorizationHeaderString = 'Authorization: Basic ' + encodedData; var myHeaders = new Headers(); myHeaders.append("Access-Control-Allow-Origin","") myHeaders.append("Access-Control-Request-Headers", "") myHeaders.append("Authorization" , authorizationHeaderString) var formdata = new FormData(); formdata.append("groups", ""); var requestOptions = { method: 'GET', mode: 'no-cors', headers: myHeaders, redirect: 'follow', }; fetch("", requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));