# Can't generate multiple API keys?

**URL:** <https://meta.discourse.org/t/cant-generate-multiple-api-keys/21011>\
**Category:** Feature\
**Created:** [October 10, 2014, 1:31pm UTC](https://meta.discourse.org/t/cant-generate-multiple-api-keys/21011 "2014-10-10T13:31:27Z")\
**Posts on this page:** 1\
**Showing post:** 7

<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:** [December 1, 2016, 1:08pm UTC](https://meta.discourse.org/t/cant-generate-multiple-api-keys/21011/7 "2016-12-01T13:08:35Z")

</div>

Probably should still funnel all front-end requests to your back-end first, then use the appropriate api\_key for the user and have the back-end make the api call to discourse.

If you do want to keep in all on the front-end, I would generate a new discourse\_api key every time the user logs in to your app. You will also have to setup CORS on discourse to accept the requests from your front-end.

You could also implement SSO (single-sign-on) so your users could just use discourse directly without having to login again.

---

_[View the full topic](https://meta.discourse.org/t/cant-generate-multiple-api-keys/21011)._
