Ban History results in HTTP 403: Forbidden

Hi, I’m having problems with the new Ban API that came out recently. Whenever I try and acquire someone’s ban history in studio it results in HTTP 403: Forbidden, rather than the actual ban history. How can I fix this?
Here is the code (It’s one line):

print(game.Players:GetBanHistoryAsync(1787100815))

Here is the error I’m receiving:
image

2 Likes

Does it work ingame?

I am not 100% on scripting myself, especially with the ban API however. Going through what code you have given, two things I would say;

  1. Make sure its in a server script
  2. Async will need to be wrapped in a pcall as they are asynchronous network requests that can fail.

Overall, if your still struggling. I would suggest reading through this as this works. Should give you a better mind your dealing with.