Skip to main content
Creating an API key requires administrator access to your Discourse instance. API keys grant access to your Discourse data — store them securely and never share them publicly.

Find your Discourse domain

Your Discourse domain is the address of your forum, without the protocol or any path.

  • Sign in to your forum and copy the domain from your browser address bar.
  • Format: {your-forum}.discourse.group for Discourse-hosted sites, or your own domain for a self-hosted instance
  • Example: if your address bar shows https://community.example.com/latest, your domain is community.example.com
  • Do not include the protocol prefix or a trailing slash.
  • On Discourse-hosted sites you can also confirm it under Admin > Manage account, in the Site Domain panel.
  • Enter this value in the Domain field in StackOne Hub.
The Manage account page with the Site Domain panel highlighted

Generate an API key

API keys are created from the admin area of your Discourse instance and are shown only once.

1

Sign in to Discourse

Sign in to your Discourse instance in a browser as a user with administrator access.

  • Discourse-hosted sites: https://{your-forum}.discourse.group/login
  • Self-hosted sites: https://{your-domain}/login — for example https://community.example.com/login
  • Enter your Email / Username and Password, then click Log In.
The Discourse login page with the Email / Username field, Password field, and Log In button highlighted
2

Open the admin area

In the sidebar, click Admin.

The Discourse forum sidebar with the Admin link highlighted
3

Open the API keys page

In the admin sidebar, expand Advanced and select API keys.

  • You can also go directly to /admin/api/keys on your instance.
The admin sidebar with the Advanced section expanded and API keys highlighted
4

Add a new key

On the API keys page, click Add API key.

The API keys page with the Add API key button highlighted
5

Configure and save the key

Enter a Description that identifies the integration, then click Save.

  • Description: StackOne Integration
  • Leave User level set to All users and Scope set to Global — these are the defaults and no change is needed.
The new API key form with the Description field, User level and Scope menus, and the Save button highlighted
6

Copy the key

Click Copy to copy the generated key, then click Continue.

  • The key is only displayed once and cannot be retrieved later.
  • Paste it into the API Key field in StackOne Hub, and store it securely for use later.
The generated API key screen with the key value hidden and the Copy button highlighted

Find your API username

The API username is the Discourse user that requests are made on behalf of. The user must have permission for the actions you intend to perform, so an administrator account is recommended.

  • Your username is shown in the welcome message on your forum home page, for example Welcome back, jane_admin!
  • You can also use system for system-level administrator access.
  • Enter this value in the API Username field in StackOne Hub.
The Discourse forum home page with the welcome message showing the signed-in username highlighted

Linking the Account from the Hub

1

Navigate to the Hub

Use one of the three Linking Account Methods to access the Hub.
2

Fill out the fields

Fill out the following fields using details from your provider:
  • Domain
  • API Key
  • API Username
3

Connect

  • Click Connect
  • If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider’s authorization flow.
  • Once authorization is successful, you will see a confirmation popup

If the account linking is successful, you will see the newly linked account in your Accounts page.