> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Discord OAuth 2.0 connector profile – StackOne setup guide

> Set up the OAuth 2.0 connector profile for Discord in StackOne. One-time admin setup required before your users can link Discord accounts via Hub.

<Panel>
  <div className="not-prose guides-scope-selector" data-guides-scope-selector data-guide-actions-json="[{&#x22;id&#x22;:&#x22;discord_get_current_user&#x22;,&#x22;label&#x22;:&#x22;Get Current User&#x22;,&#x22;scopes&#x22;:[&#x22;identify&#x22;]},{&#x22;id&#x22;:&#x22;discord_list_current_user_guilds&#x22;,&#x22;label&#x22;:&#x22;List Current User Guilds&#x22;,&#x22;scopes&#x22;:[&#x22;guilds&#x22;]},{&#x22;id&#x22;:&#x22;discord_get_current_user_guild_member&#x22;,&#x22;label&#x22;:&#x22;Get Current User Guild Member&#x22;,&#x22;scopes&#x22;:[&#x22;guilds.members.read&#x22;]},{&#x22;id&#x22;:&#x22;discord_list_current_user_connections&#x22;,&#x22;label&#x22;:&#x22;List Current User Connections&#x22;,&#x22;scopes&#x22;:[&#x22;connections&#x22;]},{&#x22;id&#x22;:&#x22;discord_get_current_user_application_role_connection&#x22;,&#x22;label&#x22;:&#x22;Get Current User Application Role Connection&#x22;,&#x22;scopes&#x22;:[&#x22;role_connections.write&#x22;]},{&#x22;id&#x22;:&#x22;discord_update_current_user_application_role_connection&#x22;,&#x22;label&#x22;:&#x22;Update Current User Application Role Connection&#x22;,&#x22;scopes&#x22;:[&#x22;role_connections.write&#x22;]},{&#x22;id&#x22;:&#x22;discord_unified_get_me&#x22;,&#x22;label&#x22;:&#x22;Get Unified Credentials&#x22;,&#x22;scopes&#x22;:[&#x22;identify&#x22;]},{&#x22;id&#x22;:&#x22;discord_unified_list_organizations&#x22;,&#x22;label&#x22;:&#x22;List Unified Organizations&#x22;,&#x22;scopes&#x22;:[&#x22;guilds&#x22;]},{&#x22;id&#x22;:&#x22;discord_unified_get_organization&#x22;,&#x22;label&#x22;:&#x22;Get Unified Organization&#x22;,&#x22;scopes&#x22;:[&#x22;guilds&#x22;]},{&#x22;id&#x22;:&#x22;discord_unified_list_resource_types&#x22;,&#x22;label&#x22;:&#x22;List Unified Resource Types&#x22;,&#x22;scopes&#x22;:[&#x22;identify&#x22;]}]">
    <div className="guides-scope-selector__title">Select Actions to adjust the guide</div>
    <div className="guides-scope-selector__muted guides-scope-selector__subtitle">Some actions may require additional configuration in the provider to be accessible. Choose the actions you need and the guide will be updated.</div>

    <div className="guides-scope-selector__toolbar">
      <input type="text" placeholder="Search actions..." className="guides-scope-selector__input guides-scope-selector__search" data-guide-action-search />

      <button type="button" className="guides-scope-selector__quick-btn" data-guide-select-all>Select all</button>
      <button type="button" className="guides-scope-selector__quick-btn" data-guide-clear>Clear</button>
    </div>

    <div className="guides-scope-selector__list">
      <div className="guides-scope-selector__list-header">
        <div className="guides-scope-selector__list-header-spacer" />

        <div className="guides-scope-selector__list-header-action">Action</div>
        <div className="guides-scope-selector__list-header-scopes">Scope(s)</div>
      </div>

      <div className="guides-scope-selector__muted guides-scope-selector__status" data-guide-loading>Loading actions...</div>
      <div className="guides-scope-selector__muted guides-scope-selector__status" data-guide-no-results hidden>No actions match your search.</div>
    </div>

    <div className="guides-scope-selector__url-section">
      <div className="guides-scope-selector__muted guides-scope-selector__label">Dynamic Guide URL</div>

      <div className="guides-scope-selector__url-row">
        <input type="text" readOnly className="guides-scope-selector__input guides-scope-selector__url-input" data-guide-url />

        <button type="button" className="guides-scope-selector__copy-btn guides-scope-selector__copy-btn--end" data-guide-copy-url>Copy URL</button>
      </div>

      <div className="guides-scope-selector__scopes-section">
        <div className="guides-scope-selector__muted guides-scope-selector__label">Scopes Selected</div>

        <div className="guides-scope-selector__scopes-row">
          <pre className="guides-scope-selector__input guides-scope-selector__scopes-output" role="textbox" aria-readonly="true" tabIndex={0} data-guide-scopes-output />

          <div className="guides-scope-selector__muted guides-scope-selector__side-controls">
            <div className="guides-scope-selector__side-label">Separator</div>

            <select className="guides-scope-selector__input guides-scope-selector__delimiter" data-guide-scope-delimiter>
              <option value="space">Space</option>
              <option value="comma">Comma</option>
              <option value="semicolon">Semicolon</option>
              <option value="pipe">Pipe</option>
              <option value="newline">Newline</option>
            </select>

            <button type="button" className="guides-scope-selector__copy-btn" data-guide-copy-scopes>Copy scopes</button>
          </div>
        </div>
      </div>
    </div>
  </div>
</Panel>

<section data-guide-section data-guide-scopes="">
  <h2>Create a Discord application</h2>

  <p>StackOne connects to Discord through an application you register in the Discord Developer Portal.</p>

  <Steps>
    <Step title="Sign in to Discord">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Sign in to your <a href="https://discord.com/developers/applications" target="_blank" rel="noopener noreferrer">Discord Developer Portal account</a>.</p>

        <img src="https://mintcdn.com/stackone-60/NxxaKNjTU26vO3GD/connectors/discord/images/oauth2-setup-sign-in.png?fit=max&auto=format&n=NxxaKNjTU26vO3GD&q=85&s=4398f9555d35929d608509eb7d6985e7" alt="The Discord log in page with the Log In button highlighted" width="1280" height="800" data-path="connectors/discord/images/oauth2-setup-sign-in.png" />
      </div>
    </Step>

    <Step title="Create a new app">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>On the <strong>Applications</strong> page, click <strong>New Application</strong>.</p>

        <ul>
          <li>Name: e.g. `StackOne Integration` - any name works, it is only a label for your app</li>
          <li>Select the checkbox agreeing to the Discord <strong>Developer Terms of Service</strong> and <strong>Developer Policy</strong>.</li>
          <li>Click <strong>Create</strong>.</li>
        </ul>

        <img src="https://mintcdn.com/stackone-60/NxxaKNjTU26vO3GD/connectors/discord/images/oauth2-setup-create-app.png?fit=max&auto=format&n=NxxaKNjTU26vO3GD&q=85&s=38136e50a5d939ffcca13b09b6eba423" alt="The Create a new app dialog with the Name field, the terms checkbox and the Create button highlighted" width="1280" height="800" data-path="connectors/discord/images/oauth2-setup-create-app.png" />
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Register the StackOne redirect URI</h2>

  <p>Discord only completes an authorization when the redirect URI in the request exactly matches one registered on the app.</p>

  <Steps>
    <Step title="Open the OAuth2 page">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>In the sidebar, under <strong>Overview</strong>, click <strong>OAuth2</strong>.</p>

        <img src="https://mintcdn.com/stackone-60/NxxaKNjTU26vO3GD/connectors/discord/images/oauth2-setup-open-oauth2.png?fit=max&auto=format&n=NxxaKNjTU26vO3GD&q=85&s=4672fb6a4b62dca145280e16359497ec" alt="The General Information page with OAuth2 highlighted in the sidebar" width="1280" height="800" data-path="connectors/discord/images/oauth2-setup-open-oauth2.png" />
      </div>
    </Step>

    <Step title="Add the redirect URI">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>In the <strong>Redirects</strong> section, click <strong>Add Redirect</strong> and enter the StackOne callback URL.</p>

        <ul>
          <li>Redirect URI: `https://api.stackone.com/connect/oauth2/discord/callback`</li>
          <li>Click <strong>Save Changes</strong>.</li>
        </ul>

        <img src="https://mintcdn.com/stackone-60/NxxaKNjTU26vO3GD/connectors/discord/images/oauth2-setup-add-redirect.png?fit=max&auto=format&n=NxxaKNjTU26vO3GD&q=85&s=afd71a285f7c8d0d919c57fbf6d0cb33" alt="The Redirects section with the StackOne callback URL entered and the Save Changes button highlighted" width="1280" height="800" data-path="connectors/discord/images/oauth2-setup-add-redirect.png" />
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Choose the scopes to request</h2>

  <p>The <strong>Scopes</strong> field in the StackOne Connector profile holds the OAuth scopes Discord asks each user to approve during the authorization flow. Scopes are not configured on the app itself.</p>

  <Steps>
    <Step title="Select the scopes this integration needs">
      <div data-guide-step data-guide-scopes="identify,guilds,guilds.members.read,connections,role_connections.write" data-guide-display-scopes-list="identify,guilds,guilds.members.read,connections,role_connections.write">
        <div className="connector-guide-actions-badge" data-guide-actions-badge data-guide-actions-badge-scopes="identify,guilds,guilds.members.read,connections,role_connections.write">
          <span>Enables actions: </span><span data-guide-actions-badge-labels>Get Current User, Get Current User Application Role Connection, Get Current User Guild Member, Get Unified Credentials, Get Unified Organization, List Current User Connections, List Current User Guilds, List Unified Organizations, List Unified Resource Types, Update Current User Application Role Connection</span>
        </div>

        <p>Enter the scopes below as a space-separated list in the <strong>Scopes</strong> field in the StackOne Connector profile. Leave the field empty to request the connector's default set.</p>

        <div className="connector-guide-display-scopes" data-guide-display-scopes>
          <div className="connector-guide-scopes-container">
            <ul className="not-prose connector-guide-scopes-list">
              <li data-guide-display-scope="identify">
                <button type="button" className="connector-guide-scope-copy" aria-label="Copy identify" title="Copy scope" data-copy="identify">
                  <span className="connector-guide-scope-copy__label">identify</span>
                  <span className="connector-guide-scope-copy__icon" aria-hidden="true">⧉</span>
                </button>
              </li>

              <li data-guide-display-scope="guilds">
                <button type="button" className="connector-guide-scope-copy" aria-label="Copy guilds" title="Copy scope" data-copy="guilds">
                  <span className="connector-guide-scope-copy__label">guilds</span>
                  <span className="connector-guide-scope-copy__icon" aria-hidden="true">⧉</span>
                </button>
              </li>

              <li data-guide-display-scope="guilds.members.read">
                <button type="button" className="connector-guide-scope-copy" aria-label="Copy guilds.members.read" title="Copy scope" data-copy="guilds.members.read">
                  <span className="connector-guide-scope-copy__label">guilds.members.read</span>
                  <span className="connector-guide-scope-copy__icon" aria-hidden="true">⧉</span>
                </button>
              </li>

              <li data-guide-display-scope="connections">
                <button type="button" className="connector-guide-scope-copy" aria-label="Copy connections" title="Copy scope" data-copy="connections">
                  <span className="connector-guide-scope-copy__label">connections</span>
                  <span className="connector-guide-scope-copy__icon" aria-hidden="true">⧉</span>
                </button>
              </li>

              <li data-guide-display-scope="role_connections.write">
                <button type="button" className="connector-guide-scope-copy" aria-label="Copy role_connections.write" title="Copy scope" data-copy="role_connections.write">
                  <span className="connector-guide-scope-copy__label">role\_connections.write</span>
                  <span className="connector-guide-scope-copy__icon" aria-hidden="true">⧉</span>
                </button>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Copy the client credentials</h2>

  <p>The <strong>Client ID</strong> and <strong>Client Secret</strong> on the app's <strong>OAuth2</strong> page are the values StackOne uses to run the authorization flow.</p>

  <Steps>
    <Step title="Copy the Client ID">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>In the <strong>Client information</strong> section, click the copy icon next to <strong>Client ID</strong>, then paste the value into the <strong>Client ID</strong> field in the StackOne Connector profile.</p>

        <ul>
          <li>This is the same value shown as <strong>Application ID</strong> on the <strong>General Information</strong> page.</li>
        </ul>

        <img src="https://mintcdn.com/stackone-60/NxxaKNjTU26vO3GD/connectors/discord/images/oauth2-setup-client-information.png?fit=max&auto=format&n=NxxaKNjTU26vO3GD&q=85&s=4af5cebf619dc4e291df706ad3e39187" alt="The Client information section with the Client ID copy icon and the Reset Secret button highlighted" width="1280" height="800" data-path="connectors/discord/images/oauth2-setup-client-information.png" />
      </div>
    </Step>

    <Step title="Generate and copy the Client Secret">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Discord keeps the secret of a new app hidden, so click <strong>Reset Secret</strong> to generate one.</p>

        <ul>
          <li>Confirm with <strong>Yes, do it!</strong> in the <strong>Regenerate Secret Key?</strong> dialog.</li>
          <li>Enter your Discord password when the <strong>Multi-Factor Authentication</strong> dialog appears.</li>
          <li>Click the copy icon next to <strong>Client Secret</strong>, then paste the value into the <strong>Client Secret</strong> field in the StackOne Connector profile.</li>
          <li>The Client Secret is only displayed once and cannot be retrieved later, so store it securely for use later.</li>
        </ul>

        <img src="https://mintcdn.com/stackone-60/NxxaKNjTU26vO3GD/connectors/discord/images/oauth2-setup-client-secret.png?fit=max&auto=format&n=NxxaKNjTU26vO3GD&q=85&s=9c3f01aabf62ce7aa1dccde070a42acc" alt="The Client information section after the secret is generated, with the Client Secret value masked and its copy icon highlighted" width="1280" height="800" data-path="connectors/discord/images/oauth2-setup-client-secret.png" />
      </div>
    </Step>
  </Steps>
</section>

## Creating the StackOne Connector Profile

To create the Connector Profile in StackOne for <strong>Discord</strong>:

<Steps>
  <Step title="Navigate to Connector Profiles">
    Login to StackOne and navigate to [Connector Profiles](https://app.stackone.com/connector_profiles)
  </Step>

  <Step title="Create New Connector Profile">
    <ul>
      <li>Click <strong>+ Connector Profile</strong></li>
      <li>Search for and select <strong>Discord</strong></li>
      <li>Select <strong>Type</strong> as <strong>OAuth 2.0</strong></li>

      <li>
        Fill out the fields using details retrieved from your provider:

        <ul className="connector-guide-field-list">
          <li><strong>Client ID</strong></li>
          <li><strong>Client Secret</strong></li>
          <li><strong>Scopes</strong> (Optional)</li>
        </ul>
      </li>

      <li>(Optional) Select <strong>Actions</strong> to be enabled for this Connector Profile</li>
      <li>Click <strong>Create profile</strong></li>
    </ul>
  </Step>
</Steps>

Congratulations! The new Connector Profile will now show up in your project ready to be used. You can now continue to <a href="/connect/managing-connectors/linking-accounts">Link Accounts</a> for <strong>Discord</strong>.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.