Generate/Regenerate api_key for a user API not working

Rather than creating a key for each user, you can use an “all users” key, then change the Api-Username header on the request. There is an example at the top of https://docs.discourse.org/