What is "isFavoritedByUser" in the Roblox Api

Hello! I’m just working with the Roblox Api and I have come across “isFavoritedByUser”.

Here is a screenshot of my output when I printed the data.

image

Thanks in advance!

This is just a guess, but probably whether or not the game is favourited by the logged in user?

I was thinking that, but I have favourited Bloxburg?

I’m not sure then. Are you logged into ROBLOX with the right account?

Yes I have. I double checked everything.

1 Like

For me, it doesn’t look like you favorited Bloxburg. That is probably why it’s false. Also, where did you find this?

Firstly, I have favourited Bloxburg. I use a different account for Studio.

Secondly, I used https://games.rprxy.xyz/v1/games?universeIds=[GAME ID]

Then probably that’s why. you have not favorited the game with the account you’re using for the studio. Unless you’re using your main account’s ID, because I don’t know then.

I’m still so confused. I favourited it on my studio account.

In fact, I might know what it is. Since the API is returning something without the UserID, I guess that the isFavoritedByUser means that the game owner has favored the game.

You might have favourited in your account , but for requests from studio I don’t think you are sending the request with that user authenthicated , if you tell how you are doing this it would be easier to find the problem.

EDIT : Me try on a game I favorited via roblox api docs (My account is authenticated)
image

Me trying it via a compiler without my account authenticated :

That could infact be it. Not sure.

Sorry. Here’s the script:

game.ReplicatedStorage.NotifyEvent.OnServerEvent:Connect(function(user, gameId)
	
	local HttpService = game:GetService("HttpService")
		
	local URL_1 = "https://api.rprxy.xyz/universes/get-universe-containing-place?placeid="..tostring(gameId)
	
	local response_1 = HttpService:GetAsync(URL_1)

	local data_1 = HttpService:JSONDecode(response_1)
	
	
	local URL_2 = "https://games.rprxy.xyz/v1/games?universeIds="..data_1["UniverseId"]

	local response_2 = HttpService:GetAsync(URL_2)

	local data_2 = HttpService:JSONDecode(response_2)
	
	local data = data_2["data"][1]
	
	local frame = script.Parent
	
	warn(data)
	
	frame.Visits.Label.Text = data["visits"]
	
	frame.Game.Label.Text = data["name"]

end)

yes the issue what exactly I mentioned , check my post I have edited it gives more idea on your issue.The possible solution is to send request to roblox authenticatation api , authenticate your account then send the request with the authenticated account.

Sounds complicated, but thanks!