Introducing the Ban API and Alt Account Detection

This is both a W, and an L update.

W:
Because alts are a HUGE problem for many games on the front page, for example games that are full with exploiters like Arsenal.
L:
Because I like trolling, and knowing the dumb cafe games they’re probably going to implement this and ban people using banapi.

1 Like

thank you roblox, but is this api available right now?

1 Like

I really do like what this is doing but I STRONGLY believe roblox needs to either give us a way to sandbox code via a script instance or by code, or give us a way to disable the api entirely. This inadvertently hinders the ability for some types of games to exist and can Greatly hurt a lot of smaller games.

This should not have been released without one or the other.

2 Likes

Yep just tested alt account detection used account switcher, same ip. and same device and no detection on the alt.

How did you get it to work? I can’t figure it out.

Use the OpenCloud API under user-restrictions

url: https://apis.roblox.com/cloud/v2/universes/{universeid}/user-restrictions/{userid}
body (JSON):

{
    "gameJoinRestriction": {
        "active": false,
        "displayReason": "message",
        "excludeAltAccounts": false
    }
} 

-- active true means they are banned and active false means they are not banned
-- excludeAltAccounts if alt accs should be excluded from the ban false by default, make true if you only want to ban the acc and not alts
-- displayReason is the reason the user sees when kicked theres also other options check docs

use patch as the request and set ur apikey under the header x-api-key

make sure to create an apikey

1 Like

im using the opencloud api as its easier to unban yourself

Can you send me the link for it? I can’t find it lol

local Players = game:GetService('Players')

Players:BanAsync({
 UserIds = {USER_IDS_HERE},
 ApplyToUniverse = true, -- whether the banned players should get kicked from every place in the game
 Duration = 60, -- time in seconds
 DisplayReason = 'reason to be shown to the player',
 PrivateReason = 'reason that will be shown in the ban history',
 ExcludeAltAccounts = false, -- whether alt checking should be disabled or not (boolean)
})
2 Likes

THANK YOU!!! This might just make things wayyyyy easier.

1 Like

I have a question, what if someone requests a Right to Be Forgotton request, do we have to unban them from the game? And would they be able to join on alts?

And one last question…

If I were to ban someone, let’s use Jake as an example. (jake is a random eprson just amde up now). If I ban him using a -ban command I made for it to ban him using BanAsync, would it kick him from that game, or does the ban only take affect once he rejoins?

Pretty sure that’s not the case. Although roblox might just remove the ban automatically without sending you a request.

Idea for the future would be flagging accounts that got a certain amount of bans in other games over a recent period of time as potential offenders and allowing other games to see that flag.

I doubt this would be added in any official capacity. Not to mention that experiences have very different rules so tallying bans in this manner wouldn’t help very much unless ban reason or category is also included and it doesn’t seem like the API has any way of categorizing bans.

I would hope so that Roblox will be tracking that kind of stuff internally anyway for the site-wide moderation purposes.

This would be a bad idea for the exact same reason. Deleting or even just temporarily banning someone’s account for getting banned from experiences based on those experiences’ own rules wouldn’t make much sense, especially since plenty of things that would be perfectly reasonable to ban someone from a game for don’t violate TOS in any way.

1 Like

Do banned users still trigger Players.PlayerAdded? If not, is there some way to hook a banned player joining? Our game currently uses a MongoDB database to handle cross-game bans, which the Ban API sadly doesn’t allow for, so we are forced to keep the datastore but use the Ban API for the alt detection system. Changes are very often made to this datastore, but there’s no way to listen for said changes, so we need a way to check the players status on our datastore, then unban them if needed all before the error message displays.

This is awesome, but can we please edit “by the creator” part? So when moderators use this API it wont be confused by thinking the player got banned by only the “creator”, thank you!

3 Likes

just loop though the db and ban via the cloudapi

the problem is with unbanning, iterating through all bans on mongo and the roblox side would put a lot of ratelimit stress on the game afaik

On the ratelimit stress do you mean opencloud apis or httpservice

How is it possible to know that an account is an alt and you’re not just banning some innocent friend? Just curious