local function getViaKeywords(keywords: string, searchType: string)
if searchType == "Video" then
local url = `https://apis.roblox.com/toolbox-service/v2/assets:search?searchCategoryType={searchType}&query={HttpService:UrlEncode(keywords)}`
local success, data = pcall(HttpService.RequestAsync, HttpService, {
Url = url,
Method = "GET",
Headers = {
["x-api-key"] = HttpService:GetSecret("Toolbox"),
["Content-Type"] = "application/json"
}
})
if not success then warn(data, url) end
data = success and HttpService:JSONDecode(data.Body) or {}
return data
else
return {}
end
end
Does anyone know why the toolbox is return not authorized? The secret has asset:read