# Unable to create "Single User" level API key, always defaults to "All Users"

**URL:** <https://meta.discourse.org/t/unable-to-create-single-user-level-api-key-always-defaults-to-all-users/141907>\
**Category:** Bug\
**Created:** [February 18, 2020, 3:23pm UTC](https://meta.discourse.org/t/unable-to-create-single-user-level-api-key-always-defaults-to-all-users/141907 "2020-02-18T15:23:28Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [February 18, 2020, 5:44pm UTC](https://meta.discourse.org/t/unable-to-create-single-user-level-api-key-always-defaults-to-all-users/141907/3 "2020-02-18T17:44:11Z")

</div>

I can reproduce the issue if I follow the steps you have listed. When creating an API key for a single user, Discourse expects a username to be added to the form’s User field:

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/5/055cb5c7e9a80247dffb8fddad1f79bfc5879e13.png)

If ‘Single User’ is selected as the User Level, but no username is added to the User field, an All Users API key is created. I would expect an error message to be displayed instead. Similar to what happens when the form is submitted without a description.

---

_[View the full topic](https://meta.discourse.org/t/unable-to-create-single-user-level-api-key-always-defaults-to-all-users/141907)._
