API key creation

IIUC, today only ADMINs can create API key, I don’t see a reason why I shouldn’t allow user to do it for themselves for their corresponding trust_level. is there a setting I can toggle?

Unfotently there is no setting to allow users to make API keys.

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 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 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 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.