Skip to main content

Overview

To authenticate with GitLab using a Group Access Token, you need:
  1. Hostname — the hostname of your GitLab instance, such as gitlab.com or your self-hosted instance domain.
  2. Group ID — the numeric ID of the GitLab group the token belongs to.
  3. Group Access Token — a token issued by GitLab that authenticates as an auto-provisioned bot user inside the group.
This guide walks you through finding your hostname and group ID, creating a Group Access Token in GitLab, and entering the credentials in Nango Connect.

Prerequisites

  • You must have the Owner role in the target GitLab group to create a Group Access Token.
  • On GitLab.com, Group Access Tokens require a Premium or Ultimate subscription. On GitLab Self-Managed and GitLab Dedicated, they are available on any tier.

Step 1: Find your hostname

Use the domain where your GitLab instance is hosted:
  • For GitLab.com, use gitlab.com.
  • For GitLab Self-Managed or GitLab Dedicated, use your instance domain, such as gitlab.example.com.

Step 2: Find your group ID

  1. Sign in to your GitLab instance.
  2. Open your group’s overview page.
  3. Copy the numeric Group ID displayed under the group name.
Resolve a group’s numeric ID from its full URL-encoded path by calling GitLab directly. Set GITLAB_HOSTNAME to the hostname from Step 1. Authenticate with a token that has access to the group. Private groups require a Personal Access Token, Project Access Token, or Group Access Token with read_api or wider scope. Public groups can be looked up without authentication.
Read the numeric id field from the JSON response. See the GitLab groups API for the response schema.

Step 3: Create a Group Access Token

  1. From the top bar, select Search or go to and find your group.
  2. Select Settings > Access tokens.
  3. Select Add new token.
  4. Enter a name and expiration date. The name becomes the display name of the auto-provisioned bot user.
  5. Select the bot user’s Role based on the operations your integration performs. Lower roles may support viewing or commenting. Creating merge requests generally requires Developer. Approval and protected-branch merge permissions depend on the project’s settings.
  6. Select the scopes you need. api grants full read and write access; use narrower scopes such as read_api and read_repository where possible.
  7. Select Create group access token.
GitLab form for creating a Group Access Token
Copy the token immediately. GitLab does not show it again after you leave the page.
GitLab creates a bot user inside the group when you generate the token. The bot’s username follows the pattern group_<group_id>_bot_<random>. The bot counts as a group member but not as a licensed seat.
Create a Group Access Token with the GitLab API. Authenticate with a token belonging to a group Owner, and replace the placeholders with the target group ID and desired token configuration.
access_level=30 creates a Developer bot user. Choose the minimum access level and scopes required for the integration. Save the returned token value immediately because GitLab only returns it once.

Step 4: Enter credentials in Nango Connect

  1. Open the Nango Connect form for GitLab (Group Access Token).
  2. Enter the Hostname, Group ID, and Group Access Token.
  3. Submit the form to connect the group.
Nango Connect form for a GitLab Group Access Token You are now connected to GitLab using a Group Access Token.