How to get a list of experiences published by a certain player?

So basically, im trying to get a list of experiences that a certain player has published. Is there a function that can do this?

1 Like

For this you need to use a proxy, I dont know of any but I am sure there are some

You can use the Roblox game API and the user/games endpoint. For getting the data from a endpoint use the HttpService:GetAsync and JsonDecode functions.

2 Likes

Thank you, I don’t how to use HttpService or Json, but I will look at some tutorials and hopefuly make my script work!

1 Like

Hello there!

Here’s everything you need to get experiences published by someone.
HttpService
:GetAsync()
JSONDecode()

I made a tiny script so you can understand how HttpService works.

local HttpService = game:GetService("HttpService")
local Endpoint = "https://games.roproxy.com/v2/users/%s/games?sortOrder=Asc&limit=10"

local function getPlayerExperiences(UserId)
	
	-- Sends a requjest to the API
	local playerExperiences = nil
	local success, error = pcall(function()
		playerExperiences = HttpService:GetAsync(string.format(Endpoint, UserId))
	end)
	
	-- If the request was successful
	if success then
		playerExperiences = HttpService:JSONDecode(playerExperiences) -- Converts the json response to a LUA table
		return playerExperiences
	end
	
end

getPlayerExperiences("519023137")

:warning: Important!
You CANNOT send requests to the Roblox API endpoints from Roblox games. Instead, you’ll have to use a proxy. I personnaly use roproxy.com.

This is the reason why the URL in my Endpoint variable was changed from:
https://games.roblox.com/v2/users/%s/games?sortOrder=Asc&limit=10
to:
https://games.roproxy.com/v2/users/%s/games?sortOrder=Asc&limit=10

3 Likes

I was messing a little with your script and I got it working the way I needed. Thanks a lot!

1 Like