Skip to content

Data type

Secret

Official docs ↗

Stores secret non-printable content.

About Secret

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 2

  • AddPrefix(prefix: string) → SecretPrepends 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(suffix: string) → SecretAppends 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.

Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.