While this could be unrelated to the bug, I also just wish to point out that startTime and inherited are read-only so such values will have no effect on the actual ban which could lead to other unintended behaviours.
I’ve removed those from the body but still doesn’t work. I get status 200 but nothing happens.
Just to clarify, the in-game Players:BanAsync() does work, just the API isn’t.
Thank you for the report. We have not been able to reproduce the behavior you’re encountering. We believe that there could be an idempotency key clash where there have been other bans or unbans created with the idempotency key you provided in the API call, which could lead to a 200. Is it possible for you to give us the idempotency key you were using? In the mean time, can you try making the call again with a different idempotency key?
I don’t believe that could be a possibility. There aren’t any existing bans and the idempotency key is a randomly generated uuid with uuid4. Here is a key used that returned 200, but didn’t ban: 0ed1e063-4aa8-450e-9481-4d0cb4faf497
Would you be able to share the steps you guys took to successfully use the API? I’m not sure where to go as I’ve tried the following to no avail: new API key, different universe, different idempotency key.
Resolved! I overlooked what data is sent through the body. The data should be inside gameJoinRestriction like this:
I hope changes can be made internally at Roblox for 400 to be returned if the body is malformed. Massive thanks to @MightyPart for pointing out the issue!
We are glad you were able to quickly solve this issue on your own. We have created a task to update the API to respond with an error for malformed data. Thank you for taking the time to report this and helping us improve our feature.