Discourse

Communication API key and username

Create and read topics, posts, users and categories on a Discourse forum from any Windmill script, flow or app.

Set up in 3 steps

1

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.

2

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.

3

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.

Resource type

discourse — the shape of the credential every script on this page expects.

View raw schema →
FieldTypeRequiredWhat it is
apiKeystringNoAPI key retrieved from Discourse.
apiUsernamestringNoAPI username retrieved from Discourse.
defaultHoststringNoBase 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.