Does anybody know how to resolve this FetchApp request with the headers.
The Api key and api secret are correct they work in python. I am just unable to authenticate the request in Google App Scripts.
` let headers = {
‘Authorization’: ‘Basic ‘ + Utilities.base64Encode(api_key + “:” + api_secret)
}
let options = {
‘method’ : ‘GET’,
‘header’ : headers,
‘muteHttpExceptions’: true
}
let response = UrlFetchApp.fetch(‘https://api.shoplightspeed.com/us/products.json’, options);
Logger.log(response);`
I was expecting a response from the from the forms showing the products. I was able to get the response correctly in python
Tyler Grace is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.