Hi everyone. I'd like to distribute clientid/clie...
# suitescript
d
Hi everyone. I'd like to distribute clientid/clientsecret in a SuiteApp. I figured I'd create a
secret
using the API Secrets feature (concatenate the id::secret into a single string), then simply access and split the string in my code. Anyone know how to retrieve the secret string?
w
From what I have seen, you can never read the secret using own functions. It will only be accessible serverside using netsuites functions to use it in requests.
e
Right, I was hoping someone would find a way. Ok, hmmm. Now, how should I solve this.
b
basically hope N/crypto and N/https support what you need to do
d
I ended up encrypting the credentials using a secret (managed by API Secrets). So, the encrypted credentials are hardcoded in the source, and the distributed secret is used to decrypt. Seems like a good solution. It'll be a pain to manage the encrypted data, but minor.