For the complete documentation index, see [llms.txt](https://docs.pandium.com/llms.txt). This page is also available as [Markdown](https://docs.pandium.com/integration-hub/setting-up-source-control/creating-a-gitlab-app.md).

To configure your GitLab Source Control, you must first create an OAuth2 application within your GitLab account. GitLab allows you to create an OAuth2 application at 3 different permission levels: [User](https://docs.gitlab.com/integration/oauth_provider/#create-a-user-owned-application), [Group](https://docs.gitlab.com/integration/oauth_provider/#create-a-group-owned-application), or [Instance-Wide](https://docs.gitlab.com/integration/oauth_provider/#create-an-instance-wide-application). We generally encourage you to use the Group-level OAuth2 application, but please feel free to use whichever best fits your organization.

### [Direct link to heading](https://docs.pandium.com/integration-hub/setting-up-source-control/creating-a-gitlab-app#creating-a-group-owned-application)    Creating a Group-Owned Application

To create a new application for a group:

1. Go to the desired group.

2. In the left sidebar, select **Settings** > **Applications**.

3. Enter a **Name** and **Redirect URI**.

1. The Redirect URI will be dependent on your environment.

1. Demo: [https://api.demo.pandium.com/v0/author/callback/oauth2](https://api.demo.pandium.com/v0/author/callback/oauth2)

2. Sandbox: [https://api.sandbox.pandium.com/v0/author/callback/oauth2](https://api.sandbox.pandium.com/v0/author/callback/oauth2)

3. Sandbox EU: [https://api.sandbox-eu.pandium.com/v0/author/callback/oauth2](https://api.sandbox-eu.pandium.com/v0/author/callback/oauth2)

4. Production: [https://api.pandium.io/v0/author/callback/oauth2](https://api.pandium.io/v0/author/callback/oauth2)

5. Production EU: [https://api.pandium-eu.io/v0/author/callback/oauth2](https://api.pandium-eu.io/v0/author/callback/oauth2)

4. Select OAuth 2 scopes (API Access, Read_Repository, Write_Repository)

5. Ensure the **Confidential** checkbox is checked.

6. Select **Save application**. GitLab provides:

- The OAuth 2 Client ID in the **Application ID** field.

- The OAuth 2 Client Secret, accessible by selecting **Copy** in the **Secret** field.

- The **Renew secret** function. Use this function to generate and copy a new secret for this application. Renewing a secret prevents the existing application from functioning until the credentials are updated.

7. Notate the Application ID, Secret, and Scopes as they will be required for connecting to Pandium Source Control.
