# API username query

**URL:** https://meta.discourse.org/t/api-username-query/60227
**Category:** Support
**Created:** [March 31, 2017, 8:59am UTC](https://meta.discourse.org/t/api-username-query/60227 "2017-03-31T08:59:58Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![benp83](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@benp83](https://meta.discourse.org/u/benp83)
#### Post date: [March 31, 2017, 8:59am UTC](https://meta.discourse.org/t/api-username-query/60227/1 "2017-03-31T08:59:58Z")

</div>

I’ve run into a slight problem.

My dev is on holiday and my client has asked me to supply our API\_username.

Is this something I can easily locate?

Any help/ guidance would be massively appreciated.

Thanks in advance

Ben

---

<div class="post-metadata">

### Author: ![mikechristopher](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikechristopher/32/89135_2.png) [@mikechristopher](https://meta.discourse.org/u/mikechristopher)
#### Post date: [March 31, 2017, 9:07am UTC](https://meta.discourse.org/t/api-username-query/60227/2 "2017-03-31T09:07:46Z")

</div>

It depends which user name is being used - check out here and you will see the API keys that have been generated and work from there -

forumdomain.tld/admin/api/keys

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 31, 2017, 7:03pm UTC](https://meta.discourse.org/t/api-username-query/60227/3 "2017-03-31T19:03:12Z")

</div>

See `/admin/api/keys`. You can have keys either for a particular user, or there is a master key that works for all users. If they have the “all users” api key, then the username is whatever user they want it to be.

---

<div class="post-metadata">

### Author: ![benp83](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@benp83](https://meta.discourse.org/u/benp83)
#### Post date: [April 3, 2017, 1:21pm UTC](https://meta.discourse.org/t/api-username-query/60227/4 "2017-04-03T13:21:12Z")

</div>

Thanks guys. Very helpful

---

<div class="post-metadata">

### Author: ![texxxo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/texxxo/32/119717_2.png) [@texxxo](https://meta.discourse.org/u/texxxo)
#### Post date: [March 19, 2019, 10:50am UTC](https://meta.discourse.org/t/api-username-query/60227/5 "2019-03-19T10:50:48Z")

</div>

That means I can use my username that is in the url whe the API is set to all ?

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [April 10, 2019, 4:36pm UTC](https://meta.discourse.org/t/api-username-query/60227/6 "2019-04-10T16:36:16Z")

</div>

Yes, you can use your username or “system” as the `api_username`. Unless you are trying to get user specific information like the notifications of a user, then you would need to use their username.
