Nice catch @xbd - this will be fixed by
https://github.com/discourse/discourse/pull/37177
But in the meantime…
… you can use the user id (it’s actually preferred over the username if you have it) via the Api-User-Id header
curl -X GET "https://your-discourse.com/admin/users.json" \
-H "Api-Key: your-api-key" \
-H "Api-User-Id: 123"