Discourse
Communication API key and usernameCreate and read topics, posts, users and categories on a Discourse forum from any Windmill script, flow or app.
Set up in 3 steps
Create an API key
As a Discourse admin, open Admin, then API, then Keys. Create one, choosing whether it acts as a single user or as any user.
Add the resource in Windmill
Open Resources, add a resource of type discourse. defaultHost is your forum's host, apiKey is the key, and apiUsername is the account the calls should act as — system for an admin-level key.
Run your first script
Fork any script below and read before writing anything. There are dozens here, so search by the verb you need.
Scripts
Building blocks, if none of the projects above fit. Fork one, run it, or call it as a step inside your own flow.
delete a single post
Updates a category
Update username
Update topic timestamp
Update the status of a topic
Update tag group
Update email
Update badge
Update avatar
Update a user
Update a topic
Update a single post
Update a group
Suspend a user
Silence a user
Show category
Set notification level
Send password reset email
Send download backup email
Search for a term
Retrieves a list of categories
Retrieve a single post
Remove group members
Remove a topic
Refresh gravatar
Mark notifications as read
Log a user out
Lock a post from being edited
List topics
List replies to a post
Resource type
discourse — the shape of the credential every script on this page expects.
| Field | Type | Required | What it is |
|---|---|---|---|
| apiKey | string | No | API key retrieved from Discourse. |
| apiUsername | string | No | API username retrieved from Discourse. |
| defaultHost | string | No | Base URL of the Discourse instance. |
Questions
What does apiUsername change?
Who the call is made as. Posts and topics are attributed to that account, and it is what Discourse checks permissions against — a key alone does not identify a user.
Is my key stored on the hub?
Never. It lives only in your own Windmill workspace, encrypted at rest.