Get GroupID from Name

Hey there,

So, I’m trying to get Roblox Group Data. This however requires you to get the Group ID.

Now, I don’t want the player to go to the Roblox Website trying to find the Group ID. It just takes too much time and some people don’t even know what the hell that is!

And so, to make it easier and faster, I want people to enter the Group’s Name instead of the ID, but I couldn’t find anything helpful so far. Any ideas?

I don’t think it is possible to get the name, but you can get the groups he is in:

And yes you can get the names too easily.

you have to use somekind of http service api and hacky stuff to do it i guess im not sure about that

Will the user be in the group, or will they be looking for a new group?

If the user is already in the group I can write you a function to convert name to ID :slight_smile:

1 Like

Nope, I’m working on a game that allows you to find and discover new groups.

Meaning that they won’t be in the group.

I’ll look into it later and try and make you a function anyways!

And finished the function!

I noticed the normal roblox proxy site doesn’t support groups so I made an API under my own site, hope that isn’t an issue (I can send you the php so you can host it if you’d like)

Anyways here is the script for it

local HttpService = game:GetService("HttpService");

local function FetchGroups(GroupName)
	local GroupsTemp = HttpService:JSONDecode(HttpService:GetAsync("https://irisapp.ca/api/RobloxAPI/GroupAPI.php?Data="..GroupName))["data"];
	local ParsedGroups = {};

	for _,Group in next, GroupsTemp do
		local GroupName = Group["name"];
		ParsedGroups[GroupName] = {
			["ID"] = Group["id"],
			["MemberCount"] = Group["membercount"],
			["PublicEntry"] = Group["publicEntryAllowed"];
			["Created"] = Group["created"];
			["Description"] = Group["description"];
		}
	end
	
	return ParsedGroups;
end

warn(FetchGroups("asdsdf"))

And this is what the output will look like when received:

{
	["asdsdfad"] =  ▼  {
		["Created"] = "2017-10-23T11:25:54.353Z",
		["Description"] = "",
		["ID"] = 3554929,
		["PublicEntry"] = false
	}
}

If you need any help feel free to ask here or pm me on site!

4 Likes

That works!

Thanks a lot for your help!