Trying to pass the Secrets API stored value to a G...
# suitescript
s
Trying to pass the Secrets API stored value to a GET request via SB debugger, but getting the following error before it even gets to the request: SSS_INVALID_TYPE_ARG.
Copy code
var apiKeyId = '{custsecret_my_password}';

 var apiKey = https.createSecureString({
       input: apiKeyId
 });
b
write the code in something like a suitelet instead
s
Was really hoping it could be accomplished via M/R script.
s
you shouldn't need to wrap your secret id in curly braces - just give it the id string unadorned.
b
choose any script for your option
a debugger will not work with secrets
s
and actually, in my use you wouldn't pass the key id to the
input
property
b
or at least how you are using it right now, which is code directly in the debugger
s
Thank you both for your time. Very helpful! I will give it a "go" this afternoon.