> ## 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.

# Connect GitLab with Personal Access Token – StackOne Hub

> Link a GitLab account in the StackOne Hub using Personal Access Token. End-user guide to authorize the integration and start using GitLab actions.

<Warning>To list a group's members, its pending invitations and the people with access only to its subgroups or projects, create the token as an Owner of that top-level group. Other roles see direct members only.</Warning>

<section data-guide-section data-guide-scopes="">
  <h2>Create an access token</h2>

  <p>Use a personal access token, or a group access token for a bot user.</p>

  <Steps>
    <Step title="Open Access tokens">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Sign in to GitLab.</p>

        <ul>
          <li>Personal access token: <strong>Edit profile</strong> > <strong>Access tokens</strong> > <strong>Add new token</strong></li>
          <li>Group access token: open the group, then <strong>Settings</strong> > <strong>Access tokens</strong> > <strong>Add new token</strong></li>
        </ul>
      </div>
    </Step>

    <Step title="Choose scopes">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Select <strong>read\_api</strong> for read-only access, or <strong>api</strong> to also use write actions. On GitLab Self-Managed with Admin Mode turned on, an administrator also selects <strong>admin\_mode</strong> to read the instance user roster and two-factor status. Set an expiry date that fits your rotation policy.</p>
      </div>
    </Step>

    <Step title="Copy the token">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Click <strong>Create token</strong> and copy it. GitLab shows it only once.</p>
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Find your instance URL</h2>

  <p>Leave the instance URL empty for GitLab.com. For GitLab Self-Managed or Dedicated, use the address you open GitLab at, such as `https://gitlab.example.com`, without a trailing slash or `/api/v4`. If the instance is behind a firewall, allow inbound HTTPS from <a href="https://docs.stackone.com/gateway/concepts/connector-profiles#connection-issues-behind-a-firewall" target="_blank" rel="noopener noreferrer">StackOne's IP addresses</a>.</p>
</section>

<div data-whitelabel-hide>
  <h2>Linking the Account from the Hub</h2>

  <Steps>
    <Step title="Navigate to the Hub">
      Use one of the three <a href="/connect/managing-connectors/linking-accounts">Linking Account Methods</a> to access the Hub.
    </Step>

    <Step title="Fill out the fields">
      Fill out the following fields using details from your provider:

      <ul>
        <li><strong>GitLab Instance URL</strong> (Optional)</li>
        <li><strong>Access Token</strong></li>
      </ul>
    </Step>

    <Step title="Connect">
      <ul>
        <li>Click <strong>Connect</strong></li>
        <li>If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider's authorization flow.</li>
        <li>Once authorization is successful, you will see a confirmation popup</li>
      </ul>
    </Step>
  </Steps>

  <p>If the account linking is successful, you will see the newly linked account in your <a href="/gateway/concepts/linked-accounts">Accounts</a> page.</p>
</div>

## Next Steps

<Columns cols={2}>
  <Card title="Webhooks setup" href="/connectors/gitlab/guides/webhook-setup">
    <p className="connector-page-auth-description connector-page-card-text">
      Configure receiving Events for GitLab into StackOne.
    </p>
  </Card>
</Columns>


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