I tried using a couple on SwaggerUI, but one of them returned an “Unauthorized” message and the other returned an empty data table. What other API could I use?
This end point here you can use to read the player’s data. At the end just set the number equal to the user’s UserId. Other than that there isn’t any other way to get the player’s favorite games.
As seen here, I can see one of my favorite games even though my inventory is private.
How exactly would I call this in game? Do I need a proxy? I tried callling it in cmd prompt and git bash to see if it was returning anything but im not actually sure how to format it
This is my code so far. How can I implement a proxy to stop the “HttpService is not allowed to access ROBLOX resources” error
local HttpService = game:GetService("HttpService")
local Players = game:GetService("Players")
local URL_TEMPLATE = "https://www.roblox.com/users/favorites/list-json?assetTypeId=9&itemsPerPage=100&pageNumber=1&userId=%d"
local function isGameFavourited(player: Player)
local url = string.format(URL_TEMPLATE, player.UserId)
local response = HttpService:GetAsync(url)
local data = HttpService:JSONDecode(response)
print("data=",data)
end
Players.PlayerAdded:Connect(isGameFavourited)
I’ve never used HttpService but just know this is a JSON file.