I would like to use the N/https module to make aut...
# suitescript
j
I would like to use the N/https module to make authenticated outbound requests. For the authentication, I'd like to use a shared secret. What are my options for managing a secret programmatically? https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/article_160216486846.html#Secrets-Management suggests that I can have secrets restricted to certain scripts and domains but is it possible to create an api secret programmatically? I can already make authenticated inbound requests to restlets so I can use that to get a secret into NetSuite but I don't understand how to securely store it.
e
I don't believe you can store them programatically. You have to do that through the "API Secrets" app.
b
your option is Form.addCredentialField which is the predecessor of api secrets
requires you to have a record, preferably custom, that you use to trigger a before load user event script so that you can add the field
and then use dynamic mode to set the field so that you can later get its guid value