How to get group games with a script

I’m making a game that gets a certain group’s games. And I really don’t know how to get them using a script. I’ve tried to use:
game.HttpService:GetAsync('https://games.roblox.com/v2/groups/GROUP_ID/games?accessFilter=2&limit=10&sortOrder=Asc')
But it says that it doesn’t have acces to ROBLOX resources… Is there another way to get them?

Please help me! :frowning:

9 Likes

HTTPService can’t connect to Roblox. You would need a proxy (i believe that’s the term) in order to access Roblox.

2 Likes

maybe something with the group service and the player service

1 Like

But how can use that Proxy? Also the group service doesnt acces group games as how @fjtiger01 said…

https://games.roblox.com/docs/index.html

1 Like

There are many resources online and on the DevForum that can help you with that.

1 Like

Roblox blocks requests from their own servers.

1 Like

good idea, but I still don’t understand how to use Proxies and also this link too…

For proxies I recently made a post on how to make your own in about 10 minutes all you would need to do is send a http get request like

local https = game:GetService('HttpService')

local ProxyUrl = "ProxyNameHere".."?link="

local GroupId = groupId

local Url = "games.roblox.com/v2/groups/"..GroupId.."/games?accessFilter=2&limit=10&sortOrder=Asc"

local EncodedUrl = https:UrlEncode(Url)

local Response = https:GetAsync(ProxyUrl..EncodedUrl)
Response = https:JSONDecode(Response)

print(Response)


3 Likes

It helped a lot! But it says that something went wrong with the request… I’ve tried this code

local Http = game:GetService('HttpService') 
local Encode = Http:UrlEncode('www.roblox.com/games.roblox.com/v2/groups/Group_Id/games?accessFilter=1&limit=10&sortOrder=Asc') 
local Link = "https://feline-granite-beat.glitch.me/?link="..Encode
print(Link)
print(Http:JSONDecode(Http:GetAsync(Link)))

Also I didn’t forget to put group id.

Then this error appears again:

Something went wrong AxiosError: Request failed with status code 401 https:///games.roblox.com/v2/groups/GROUP ID/games?accessFilter=1&limit=10&sortOrder=Asc

is this the link that i should use for getting the group games: Swagger UI ?

remove the

www.roblox.com bit and that should work :slight_smile:

local Http = game:GetService('HttpService') 
local Encode = Http:UrlEncode('games.roblox.com/v2/groups/GROUP/games?accessFilter=1&limit=10&sortOrder=Asc') 
local Link = "https://feline-granite-beat.glitch.me/?link="..Encode
print(Link)
print(Http:JSONDecode(Http:GetAsync(Link)))

still didn’t work…

It worked fine for me. accessFilter should be 2 idk why

1 Like

Hey @Zacus57, You are not allowed to use any *.roblox.com/* URLs as HTTP requests inside of Roblox games, right now the only way of doing this is using a Proxy that you can setup with Heroku (or of course other hosting services or even manually) or use already hosted Proxies such as RoProxy (RoProxy is open source meaning you can also host this Proxy yourself)
also, Roblox is working on allowing certain Roblox APIs to be allowed in games!

2 Likes

I DID IT omg tysm u are the best

1 Like

Just so you know as it is a free platform the website’s can go inactive until recalled on meaning there might be a 20 second delay if you don’t do it for a while and you have to be wary of rate limits on your acc and roblox in general

Thanks @hya123456h for advice!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.