Overview
Torii integrates with Discourse and syncs:
| User Fields | License Types |
|---|---|
| Email, name, username, role (Admin, Moderator, Member), status, last seen, created date | Discourse |
- Suspended users and users who never confirmed their email appear with an inactive license. Users deleted in Discourse are removed.
- Discourse bot accounts (such as system and discobot) and staged users (email-only placeholders who cannot log in) are not synced.
- Users without an email address are synced as well.
- You can constantly stay updated with application information from our Integrations Page >> Integration Capabilities button >> Integration Capabilities table.
Requirements
Accounts & Permissions
To connect this integration, we require the following:
- A Discourse admin account to create the API key. The user list Torii reads is available to admins only.
- A Discourse site URL that starts with https and is reachable from the internet (hosted or self-hosted).
- API access. On Discourse hosting it is included in the Pro, Business and Enterprise plans, not in the Free plan. Self-hosted sites always have it.
Required keys
- Site URL (for example, https://forum.example.com)
- API Username
- API Key
How to Generate the Required Values
- Sign in to your Discourse site as an admin.
- Go to Admin > Advanced > API Keys and click Add API key.
- Enter a description, for example Torii.
- Set User Level to All Users.
- Set Scope to Global, so Torii can also run workflow actions.
- Click Save and copy the key. Discourse shows the full key only once.
For API Username, use the username of an admin, for example system. If you create a Single User key instead, that user must be an admin, and their username goes in API Username.
Important
Keep the API key private. Discourse revokes API keys that have not been used for 180 days (the revoke_api_keys_unused_days site setting).
How to Connect the Integration
- Go to the Integrations page in Torii.
- Search for Discourse and click Connect.
- Enter the Site URL, API Username and API Key.
- Click Connect.
Actions
- Create user - creates an active, approved user in Discourse with a username and an initial password (at least 10 characters by default).
- Suspend Discourse user - suspends the user, signs them out and keeps their posts. Discourse does not suspend admins or moderators, so first revoke their staff role with Change Discourse staff role.
- Change Discourse staff role - grants or revokes moderator, or revokes admin. Granting admin is not available through the API.
Q&A
Q: What should I enter in the "Account Name" field?
A: The Account Name field lets you connect multiple Discourse sites to Torii. The value can be anything you choose. It is only used to distinguish between your connected accounts. Make sure to use a unique Account Name for each account: connecting a different account with an Account Name that is already in use will overwrite the existing account's data, so choosing distinct names is your responsibility.
For any further questions, please contact Torii Support.