Skip to content

Secret

Not yet Datatype

Stores secret non-printable content.

Not implemented in Nova

This datatype is not registered in Nova's Lua VM. Constructing or receiving it from an API call will not work.

Description

The Secret data type stores the secret content returned by HttpService.GetSecret(). It cannot be printed or logged, but can be modified using built-in functions:

Methods

AddPrefix Not yet Prepends a string to the secret content.
Secret:AddPrefix(prefix: string)

Prepends a string to the secret content.

Returns a secret formed by concatenating the supplied string to the secret content, for example prepending "Bearer" to the API key.

AddSuffix Not yet Appends a string to the secret content.
Secret:AddSuffix(suffix: string)

Appends a string to the secret content.

Returns a secret formed by concatenating the original secret and the supplied string parameter. Useful when creating a URL containing a key and query parameters.

Roblox reference: Secret