404 when trying to create an API key for system user

I am trying to create an API key for our ‘system’ user. When I click on Generate from the system user’s admin page, I get no key, and a 404 error appears in the console. There is no entry in the Discourse log.

https://<site_url>/admin/users/-1/generate_api_key Failed to load resource: the server responded with a status of 404 (Not Found)

I am able to generate API keys for other users.

I am running v1.4.0.beta9.

Can we repro this @sam? Could be legit.

It looks like a routing bug but has a very easy workaround.

Generate a global key and just pass the username system with the API call.


This works now actually. I thought you would have to use the “all users” option, but you can also select “system” as a user now and generate a key just for the system user.