# Create apikey for user programmatically as admin

**URL:** https://meta.discourse.org/t/create-apikey-for-user-programmatically-as-admin/209733
**Category:** Development
**Tags:** rest-api
**Created:** [November 20, 2021, 8:55pm UTC](https://meta.discourse.org/t/create-apikey-for-user-programmatically-as-admin/209733 "2021-11-20T20:55:11Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [November 20, 2021, 9:36pm UTC](https://meta.discourse.org/t/create-apikey-for-user-programmatically-as-admin/209733/4 "2021-11-20T21:36:20Z")

</div>

So you probably want something like [DiscourseConnect - Official Single-Sign-On for Discourse (sso)](https://meta.discourse.org/t/discourseconnect-official-single-sign-on-for-discourse-sso/13045).

Or if the app is pulling data from Discourse in the browser then the user will be logged in already. Or if the app is pulling the data in some automated fashion on he backend then you can just use the global key.

---

_[View the full topic](https://meta.discourse.org/t/create-apikey-for-user-programmatically-as-admin/209733)._
