SuiteScript 2.x APIs exclusively support the use of secrets for added security in scripting. Here is a guide to the modules and their respective methods or properties that allow access to secrets within SuiteScript 2.x:
Module and Method (or Property):
- N/sftp:
- sftp.createConnection(options)
- N/https
- https.createSecretKey(options)
- https.createSecureString(options)
- N/crypto
- crypto.createSecretKey(options)
- SecretKey.secret
- N/keyControl
- keyControl.createKey(options)
- Key.password
- N/certificateControl
- certificateControl.createCertificate(options)
- Certificate.password