Issues retrieving secrets via Suitescript
Hi all, I’m struggling a lot to figure out how to retrieve the custom secrets created via Netsuite Secret Manager, the available doc does not seem to work properly. I’m using this https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_4418247678.html and https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_0305042314.html as reference, particularly following the “Create an Authentication Header Using a Secure String” case.
Could someone please share a suitescript sample or your experience retrieving secrets using Suitescript?
Hi,
Firstly, you are unable to retrieve the secret directly but can use is, as you say, with a secure string.
https.createSecureString({ input: 'whatever you like {SECRET_KEY_ID} in here' })
So, in other words, you put your secret key ID inside curly braces and have the rest of the string however you like.
I hope that makes sense.
Thanks,
Chris