I am trying to load the Secret Key in the API Secret but no result

I created a sample secret key containing all the tokens I need to API Secret.

to load this secret key from the API Secret, I used several functions but no result.

all the method below has no result.
https.createSecureString({ input: 'custsecret_test_api_secret' });
https.createSecretKey({ secret: 'custsecret_test_api_secret', encoding: "BASE_64" });
crypto.createSecretKey({ secret: 'custsecret_test_api_secret', encoding: "BASE_64" });
Rookie Asked on January 18, 2024 in SuiteScript.
Add Comment
1 Answer(s)

Hi,

You need curly braces when referencing a secret:

https.createSecureString({ input: '{custsecret_test_api_secret}' });

Thanks,

Chris

Intermediate Answered on January 18, 2024.

Hi Chirs, do you know how to log a secret? my secret is in JSON format like this:

{ key: key, token: token }
I need to access the JSON to set its values.  I want to make sure that I am accessing the correct value.

on January 18, 2024.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Become a Sponsor   Become a Sponsor