# API Key as a query string parameter is a security risk, right?

**URL:** <https://meta.discourse.org/t/api-key-as-a-query-string-parameter-is-a-security-risk-right/67661>\
**Category:** Development\
**Created:** [08.Август.2017 17:00:46 UTC](https://meta.discourse.org/t/api-key-as-a-query-string-parameter-is-a-security-risk-right/67661 "2017-08-08T17:00:46Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![SwisherSweet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/swishersweet/32/119523_2.png) [@SwisherSweet](https://meta.discourse.org/u/SwisherSweet)\
**Post date:** [08.Август.2017 17:00:46 UTC](https://meta.discourse.org/t/api-key-as-a-query-string-parameter-is-a-security-risk-right/67661/1 "2017-08-08T17:00:46Z")

</div>

I’m working with the [Discourse API](http://docs.discourse.org/), and have learned that in order to perform a GET one must include the API key and API username in the URL as a parameter:

```
curl -X GET "http://127.0.0.1:3000/admin/users/list/active.json?api_key=714552c6148e1617aeab526d0606184b94a80ec048fc09894ff1a72b740c5f19&api_username=discourse1"

```

One of the calls I’m making is:

```
https://community.example.com/admin/users/list/active.json?filter=test&show_emails=false&order=&ascending=&_=123123123123

```

If you change `show_emails` to true, then you are exposing personal information.

Furthermore, if someone where to log HTTP traffic and gain access to your API key and admin user, they could pretty much do anything they wanted to your community.

I tried putting the API key in the header instead, but that didn’t work.

Am I I’m missing something, or is there a security risk to using the API with GET?

---

_[View the full topic](https://meta.discourse.org/t/api-key-as-a-query-string-parameter-is-a-security-risk-right/67661)._
