# How can we use custom apikey instead of auto generate by kong for consumers in key-authentication

**URL:** <https://discuss.konghq.com/t/how-can-we-use-custom-apikey-instead-of-auto-generate-by-kong-for-consumers-in-key-authentication/1213>\
**Category:** Questions\
**Created:** [June 1, 2018, 6:23am UTC](https://discuss.konghq.com/t/how-can-we-use-custom-apikey-instead-of-auto-generate-by-kong-for-consumers-in-key-authentication/1213 "2018-06-01T06:23:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jkumar-roambee](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/jkumar-roambee/32/358_2.png) [@jkumar-roambee](https://discuss.konghq.com/u/jkumar-roambee)\
**Post date:** [June 1, 2018, 6:23am UTC](https://discuss.konghq.com/t/how-can-we-use-custom-apikey-instead-of-auto-generate-by-kong-for-consumers-in-key-authentication/1213/1 "2018-06-01T06:23:25Z")

</div>

How can we use a custom key instead of auto-generated by kong for Consumers credentials using a key-authentication plugin?  
Kong version 0.13.1

---

<div class="post-metadata">

**Author:** ![jeremyjpj0916](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/jeremyjpj0916/32/1388_2.png) [@jeremyjpj0916](https://discuss.konghq.com/u/jeremyjpj0916)\
**Post date:** [June 1, 2018, 6:42am UTC](https://discuss.konghq.com/t/how-can-we-use-custom-apikey-instead-of-auto-generate-by-kong-for-consumers-in-key-authentication/1213/2 "2018-06-01T06:42:16Z")

</div>

```auto
curl -X POST http://kong:8001/consumers/{consumer}/key-auth --data 'key=yourValueHere' 

```

Should do the trick.
