Why can't I use Python for the "https://www.hackthebox.eu/api/invite/generate" post request?

same request fails with two different tools? there must be some sort of difference between them that makes the server respond in a different way