Hey guys! ```this.userApiKey = https.createSecureS...
# suitescript
e
Hey guys!
Copy code
this.userApiKey = https.createSecureString({ input: '{custsecret_example}' });
			this.clientApiKey = https.createSecureString({
				input: '{custsecret_example}',
			});
this.authHeader = { Authorization: `xyz ${this.clientApiKey}:${this.userApiKey}` };
how does this work? it's not working in this scenario. i have the API Secrets set up in NS
e
I don't typically use template literals for secrets; I'm not sure whether that behaves as expected. Here's a currently working example I have:
Copy code
let response = https.delete({
  url: requestUrl,
  headers: {
    'Authorization': https.createSecureString({ input: 'Bearer {custsecret_airtable}' })
  }
})
so in your case maybe it's:
Copy code
headers: {
    'Authorization': https.createSecureString({ input: 'Rev {custsecret_example}:{custsecret_example}' })
  }
You can't log the value of a Secret as that (potentially) compromises the Secret, if that's what you mean by "showing up as nothing"
a
no reason why it shouldn't work though... you maybe just need to wrap your header key in quotes...
Copy code
this.authHeader = { 'Authorization': `Rev ${this.clientApiKey}:${this.userApiKey}` };
and yeah.. you can't log secrets
e
wow! Thanks! it seems to have worked