I’m trying to utilize the new Secrets class in roblox as a way to safely secure my admin’s but I can’t seem to figure how to get the url. As it throws “Invalid URL”.
Secret is used with web apis. Essentially, if you need to have a private api key for a specific web request, you can create a new “secret” from your game’s configuration page and access it within a script.
I did try that.
Domain is https://pastebin.com
Secret is the pastebin code
Name is “Admins”
When I try to access the url it gives off a dictionary error and output just puts Url and Secret(Admins)
local HttpService = game:GetService("HttpService")
local PastbinUrl = "https://pastebin.com"
local FullUrl = HttpService:GetSecret("Admins"):AddPrefix(PastbinUrl)
print(HttpService:GetAsync(FullUrl))
I was going to offer a separate solution, but I re-read the original announcement, and it seems to only be compatible with the Headers dictionary withinHttpService:RequestAsync() at the current moment, so you’ll have to use that method instead