Is it possible to get asset id’s from a given group using the asset’s name, if so can you give me an example and if not please inform me so.
I browsed the DevForum but I don’t think it is possible. As I said before, you cannot get an asset from the name, since the name isn’t unique and more assets, or an error may show up.
So i cant get a list of those items?
As far as I am aware, no. Sorry.
You can use this endpoint from Inventory Api
https://inventory.roblox.com/v2/users/{userId}/inventory?assetTypes=Audio&limit=100&sortOrder=Asc
But if you want to use it in a roblox experience, you can use this free proxy: rprxy.xyz
local HttpService = game:GetService("HttpService")
local data = HttpService:GetAsync("http://inventory.rprxy.xyz/v2/users/{userId}/inventory?assetTypes=Audio&limit=100&sortOrder=Asc")
local result = HttpService:JSONDecode(data)
for _, asset in pairs(result.data) do
if asset.name == "name" then
print(asset.assetId)
break
end
end
It will only work if the user’s inventory is set to public
from groups too? that would be perfect
Do you want to get the assetId from assetname of all group members?
Well, no i used a program to transfer all animations from user to group since i didnt think ahead to make a group before the game itself, i want a script that gets all the animations from my group using the group ID and assets’ names to reassign themselves to their respective animation holders
That is true. It is not possible.
This is pain, i cant bother to search through every single animation given that i imported over 200 animations (in short words, its impossible to kick start my game)
If you’d want to get assets from a group and do something with them, you should look at Catalog API documentation. They provide detailed examples, and what queries you can input.
From what I understood that you need:
https://catalog.roblox.com/v1/search/items/details?CreatorType=2&CreatorTargetId={group id}&Category=12
-
CreatorType
is 2 as it’s a group, -
CreatorTargetId
is the group’s id, -
Category
is 12 as you’re looking for animations.
Keep in mind that you need to use HttpService.
hmm what will it do exactly?, because i have no idea how to use it, do i just place the http and it does something?
wait is it from the library or avatar catalog?
It’s an API that you’d use to get one page of animations which can be moved onto another (next page). If you search it up with your group ID, you’ll see the first page of animations in raw text.
To get this into your game, you’d need to get it by a proxy (website or anything) - but to make this easier, you could use catalog.rprxy.xyz
, which is public for everyone. Something like this would do:
local groupId = 0 --replace.
local proxy = "https://catalog.rprxy.xyz"
local path = "/v1/search/items/details?CreatorType=2&CreatorTargetId="..groupId.."&Category=12&Limit=30"
local httpService = game:GetService("HttpService")
local cursor = "" --cursor for next pages.
while wait() do --so we can do all pages.
local result, pageInfo = pcall(function() --result: if successful (no errors), pageInfo: raw data.
local page = httpService:GetAsync(proxy..path.."&cursor="..cursor) --getting the page's information.
return httpService:JSONDecode(page) --returning the page's information in LUA's form.
end)
cursor = pageInfo.nextPageCursor or "" --so we can maneuver to other pages.
print(pageInfo.data) --printing the page with animations.
--[[
you'd want to use pageInfo.data as it contains all the information
for each animation.
--]]
if cursor == "" and result then --breaks the loop when all pages have been printed.
break
end
end
Did you replace the groupId
? What is it?
Nevermind. It seems like it doesn’t even fetch user-generated animations
at all, just Roblox’s animations (and other assets).
Should’ve read that before, haha.
I read the entire catalog article and apparently you can get from players library too, do you know about that and how to make it for groups?
Okay, could you link a random animation created by the group? Need that for Group Agent ID, whatever that is. Don’t know why they didn’t make it the same as the catalog’s query.