Groups API Issue

For some reason, I cannot seem to post in the Bug Reports section on the DevForum.

Either way, I am interfacing with the Groups API specifically endpoint /v2/groups. There seems to either be an issue with the documentation or an issue with the response. It states on the documentation that memberCount should be returned, however after endless testing it doesn’t seem to be returned.

I don’t see a more applicable category for this but if anyone could give me directions to more advanced support that would be fabulous.

Thanks,
Jonny

Can you give us what it returns and what url and code ur using?

I am sending a request to https://groups.roblox.com/v2/groups?groupIds=${groupIds}.

It is returning:

[
  {
    id: 6146866,
    name: 'airMontagno',
    description: '',
    owner: { id: 395039355, type: 'User' },
    created: '2020-04-30T08:45:38.873Z',
    hasVerifiedBadge: false
  }
]

The code I am using is:

// Function to fetch group data
export async function fetchGroupData(groupIds: string) {
	const groupInfoUrl = `https://groups.roblox.com/v2/groups?groupIds=${groupIds}`;
	try {
		const response = await axios.get(groupInfoUrl);
		return response.data.data || {};
	} catch (error: any) {
		console.error("Error fetching group data:", error.message);
		return undefined;
	}
}

ur right that is odd u should fire a bug report or something but for now you should probably just use the v1 api for the mean time

https://groups.roblox.com/v1/groups

I was going to, how do I submit a bug report as their category seems to be limited. Should I just tag the developer team?

Check your response.data.data indexing. I think you want to index response.data[0] instead, but it’s hard to say. I recommend just logging console.log(response.data) that should spit out what the structure o the actual data you’re getting back is.

I think with Axios you may need to also specify that you want it to decode with JSON, you might be getting a string back instead.

I did the API request with Postman and receieved the same result.

Postman auto-unpacks JSON for you. I’m not convinced the Axios library is. I believe in my code I had to specify Axios to unpack JSON.

Oh wait, you’re saying memberCount should be returned. Yeah, sounds like a bug.

Not a bug: Groups API v2 no longer returns "memberCount" - #2 by BitwiseAndrea

its a bug that the documentation says it should be returned