> For the complete documentation index, see [llms.txt](https://docs.pandium.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pandium.com/integration-hub/setting-up-source-control/creating-a-gitlab-app.md).

# Creating a GitLab App

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.

### 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>
      2. Sandbox: <https://api.sandbox.pandium.com/v0/author/callback/oauth2>
      3. Sandbox EU: <https://api.sandbox-eu.pandium.com/v0/author/callback/oauth2>
      4. Production: <https://api.pandium.io/v0/author/callback/oauth2>
      5. Production EU: <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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pandium.com/integration-hub/setting-up-source-control/creating-a-gitlab-app.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
