Gokul_Ks
(Gokul Ks)
March 17, 2023, 11:00am
1
Is there support for PAT tokens in Discourse. There is a particular use-case we are working on that we might need PAT tokens. If yes, where can I find them?
blake
(Blake Erickson)
March 17, 2023, 6:36pm
2
You can create an api key assigned to a specific user and it will use the same user permissions that they have access to when logged in.
2 Likes
mattdm
(Matthew Miller)
March 18, 2023, 3:09pm
3
There are also (if enabled), user-provisioned API keys.
Discourse contains a system for generating API keys per user if a very specific protocol is followed. This feature facilitates “application” access to Discourse instances without needing to involve moderators.
High level description
At a high level:
Client (desktop app, browser plugin, mobile app) generates a private/public key pair and return url
Client redirects to a route on discourse giving discourse its public key
Discourse gets approval from user to use app
Discourse genera…
1 Like
Gokul_Ks
(Gokul Ks)
March 19, 2023, 11:27am
4
Tried out this request but it didn’t work, am I doing something wrong here?
I’m testing out things such that a webhook gets triggered when I request a user api key
I’m getting a 404 error
blake
(Blake Erickson)
March 19, 2023, 1:15pm
6
I don’t believe discourse has a webhook that will trigger when a “user api key” is requested.
Are you trying to use one of these events to trigger the webhook?
1 Like