# API key creation

**URL:** https://meta.discourse.org/t/api-key-creation/257074
**Category:** Development
**Tags:** rest-api
**Created:** [March 4, 2023, 7:13pm UTC](https://meta.discourse.org/t/api-key-creation/257074 "2023-03-04T19:13:56Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![ClawdiaWolf](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/clawdiawolf/32/262518_2.png) [@ClawdiaWolf](https://meta.discourse.org/u/ClawdiaWolf)
#### Post date: [March 5, 2023, 9:21pm UTC](https://meta.discourse.org/t/api-key-creation/257074/3 "2023-03-05T21:21:51Z")

</div>

Actually, there is, and they’re enabled for TL1 users and higher, but the process is a little complicated.

Assuming an admin hasn’t changed any settings, then [User API keys](https://meta.discourse.org/t/user-api-keys-specification/48536) are possible to generate mostly automatically if you can hijack the protocol used by the DiscourseHub app to generate a key.

There is a slightly more complicated manner for it as well.

@Falco posted a sample Ruby script [here](https://meta.discourse.org/t/generate-user-api-keys-for-testing/145744) that shows an alternate way of generating them.

On my instance that has a lot of devs who use the API heavily we did modify the settings to allow the callback URL to be [http://localhost:56399/discourse](http://localhost:56399/discourse) so the original method would work for us running local servers but that’s not necessary if you use the method in @Falco’s post.

---

_[View the full topic](https://meta.discourse.org/t/api-key-creation/257074)._
