Roblox API 401 Error (Fetching Group Games)

I have been developing NodeJS bot (for Discord) which fetches a list of games which were made by a group. It had been working fine for quite a while, but I have just recently found that it stops when attempting to get games of a group. I have provided a screenshot of the command line below (“rds” being readyState, “sts” being status).

image

I use an XMLHttpRequest written in JavaScript. I am using new API (V2), and have tested it in browser. Below is an image of the API link I am using.

A 401 is always the case when the bot is used. However, I have found that only the groups I am in return an actual result (or for the ones I have tested, at least). Groups I do not own return nothing but an internal server error.

Group I don’t have membership in: https://games.roblox.com/v2/groups/12660598/games?accessFilter=1&limit=100&sortOrder=Asc

Result: {"errors":[{"code":3,"message":"Not authorized.","userFacingMessage":"Something went wrong"}]}

Group I do have membership in: https://games.roblox.com/v2/groups/6866792/games?accessFilter=1&limit=100&sortOrder=Asc

Result: response was too long so trust me on this one

I then noticed that in the group with which I have membership, I also have game editing permissions. For reference, another group I am in but have no game editing permissions in (https://games.roblox.com/v2/groups/17078597/games?accessFilter=1&limit=100&sortOrder=Asc) returns the same as the first link. Also, the HTTP request gives me a 401 for the group I have editing permissions for games in when sent by the NodeJS program.

This is strange behavior, I believe. I was not sure where else this could possibly be posted, so I chose this forum under this category.

My question, however, is not about how that is to be fixed, but whether or not Roblox API has changed to cause this. I’ve checked the forum, and it is unlikely that the release of 588 has anything to do with this. I can’t see a workaround right now, so it’s best that I post this and pray for our moderation overlords to stumble upon it and consider that there may be a bug in the API before I get removed for not posting strictly studio-related development issues.

That, or someone explains to me how I am an idiot for using X API incorrectly because of Y.

3 Likes

I know this is a stupid question, but have you tried using a different API endpoint? v1 doesn’t necessarily mean “outdated”

1 Like

I just tried, and I am once again faced with that 401.

The newer one (gamesV2) gives me a 500, but all that matters to me is it doesn’t seem to work.

Only two endpoints seem to be the normal V2 and the (V2?) V2.

1 Like

I found solution. There is apparently an “accessFilter” which had to have been set to 2 for public games.

image

Unironically knew I had to be using the API wrong some way. Shame that “accessFilter=1” makes no sense to me unless I tinker with it. Simple solution. It was I who pointed out my stupidity this time.

1 Like

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