Hi everyone, hoping someone can point out what i am doing wrong. I created an api secret which contains the string value of base64 encoded string combination of the api key and pin.. then, i use it on my script as below
var secureToken = https.createSecureString({
input: '{' + 'custsecret_api_key' + '}'
});
var headers = {
"Authorization": "Basic " + secureToken,
"content-type": "application/json"
}; this one failed with response 401.. but, soon as i replace the value or hardcoded the value of secureToken, then the request works.. anything I need to change? THank you.