# Same endpoint for anonymous and authenticated users

**URL:** <https://discuss.konghq.com/t/same-endpoint-for-anonymous-and-authenticated-users/1437>\
**Category:** Questions\
**Created:** [July 11, 2018, 7:26pm UTC](https://discuss.konghq.com/t/same-endpoint-for-anonymous-and-authenticated-users/1437 "2018-07-11T19:26:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohamedrez](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/mohamedrez/32/415_2.png) [@mohamedrez](https://discuss.konghq.com/u/mohamedrez)\
**Post date:** [July 11, 2018, 7:26pm UTC](https://discuss.konghq.com/t/same-endpoint-for-anonymous-and-authenticated-users/1437/1 "2018-07-11T19:26:34Z")

</div>

I want to add this endpoint /graphql in kong for both anonymous and authenticated users :

```
if the apikey is provided consider it as authenticated
othwerwise consider it as anonymous
```

---

<div class="post-metadata">

**Author:** ![kikito](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/kikito/32/15_2.png) [@kikito](https://discuss.konghq.com/u/kikito)\
**Post date:** [July 13, 2018, 10:35am UTC](https://discuss.konghq.com/t/same-endpoint-for-anonymous-and-authenticated-users/1437/2 "2018-07-13T10:35:15Z")

</div>

The configuration you are looking for is explained step by step here:

- [https://docs.konghq.com/0.14.x/auth/#anonymous-access](https://docs.konghq.com/0.14.x/auth/#anonymous-access)

The gist is:

> To configure a Service like this, you first apply your selected authentication plugin, then create a new consumer to represent annonymous users, then configure your authentication plugin to allow anonymous access.
