## Creating a GitLab OAuth Application

### Step 1: Open Application Settings

You can create the OAuth application at either the **user level** or the **group level**:

- User Application
- Group Application

1. Sign in to your GitLab instance.
2. In the top-right corner, click your avatar and select **Edit profile**.
3. In the left sidebar, Access > click **Applications**.

1. Sign in to your GitLab instance.
2. Navigate to your group.
3. In the left sidebar, go to **Settings > Applications**.

### Step 2: Create a New Application

Fill in the application form with the following values:

| Field            | Value                                                                                       |
|------------------|---------------------------------------------------------------------------------------------|
| **Name**         | `WunderGraph Hub` (or any name you prefer)                                                |
| **Redirect URI** | `https://hub-api.wundergraph.com/api/webhooks/gitlab-postinstall`                        |
| **Confidential** | Enabled (checked)                                                                          |
| **Scopes**       | `api`, `read_repository`, `write_repository`                                              |

### Step 3: Save the Application

Click **Save application**. GitLab will display your:

- **Application ID** — this is your **Client ID**  
- **Secret** — this is your **Client Secret**

Copy the **Secret** immediately — GitLab will not show it again after you leave this page.

### Step 4: Connect to WunderGraph Hub

Return to WunderGraph Hub:

1. Go to **Settings > Integrations**.
2. Click **Connect GitLab**.
3. Select the **Self-Hosted** tab.
4. Enter your **Instance URL**, **Application ID**, and **Secret**.
5. Click **Connect**.

See the [GitLab Integration](https://hub-docs.wundergraph.com/integrations/git/gitlab) page for the full connection walkthrough.
