getSecret( )


Gets a secret by name.

The getSecret() function returns a Promise that resolves to the value of the secret that was stored in the Secrets Manager with the given name.

Note: To prevent malicious users from accessing the value of your secret, don't return the value of the secret to client side. Only use the secret's value in the backend.

Method Declaration
Copy
Method Parameters
namestringRequired

The name of the secret to get the value of.

Returns
Return Type:Promise<string>
Was this helpful?
Yes
No