Learn
Engine Data Type
Secret

Summary
Methods
Code Samples
Secret
local HttpService = game:GetService("HttpService")
local mySiteApiKey = HttpService:GetSecret("my_site")
local url = "https://apis.mysite.com?apiKey="
local urlWithKey = mySiteApiKey:AddPrefix(url)
local params = "&request=join&user=myname"
local resultingUrl = urlWithKey:AddSuffix(params)

API Reference
Methods
AddPrefix
Secret:AddPrefix(prefix:string):Secret
Parameters
prefix:string
Returns

AddSuffix
Secret:AddSuffix(suffix:string):Secret
Parameters
suffix:string
Returns

©2026 Roblox Corporation. Roblox, the Roblox logo and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.