# Key Authentication is not working

**URL:** <https://discuss.konghq.com/t/key-authentication-is-not-working/3034>\
**Category:** Questions\
**Created:** [March 18, 2019, 4:17am UTC](https://discuss.konghq.com/t/key-authentication-is-not-working/3034 "2019-03-18T04:17:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shugydw](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/shugydw/32/501_2.png) [@shugydw](https://discuss.konghq.com/u/shugydw)\
**Post date:** [March 18, 2019, 4:17am UTC](https://discuss.konghq.com/t/key-authentication-is-not-working/3034/1 "2019-03-18T04:17:22Z")

</div>

Hi!

Key Authentication plugin does not seem to work. I have tested the Basic Authentication plugin and it worked fine.

My setup:  
Kong: Docker 1.0.3-alpine  
Database: Docker Postgres 11.2-alpine  
Setup: Created a service, route, added key-auth to route, created consumer and generated a key.

When the `apikey` is set in the request, I receive

```auto
HTTP 401 Unauthorized
{"message":"No API key found in request"}

```

It occurs when the `apikey` is set in the query string or header.

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![shugydw](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/shugydw/32/501_2.png) [@shugydw](https://discuss.konghq.com/u/shugydw)\
**Post date:** [March 19, 2019, 12:16pm UTC](https://discuss.konghq.com/t/key-authentication-is-not-working/3034/2 "2019-03-19T12:16:57Z")

</div>

It seems another user faces a similar issue with this plugin.

Details: [https://github.com/Kong/kong/issues/4405](https://github.com/Kong/kong/issues/4405)

---

<div class="post-metadata">

**Author:** ![shugydw](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/shugydw/32/501_2.png) [@shugydw](https://discuss.konghq.com/u/shugydw)\
**Post date:** [April 9, 2019, 4:19am UTC](https://discuss.konghq.com/t/key-authentication-is-not-working/3034/3 "2019-04-09T04:19:29Z")

</div>

After digging further, the error seems to be on the side of Konga.

An issue has been filed as well - [https://github](https://github) .com/pantsel/konga/issues/369
