Steps
-
Log in to GitLab
- Go to https://gitlab.com and sign in
- Click your profile avatar in the top-right corner
- Select Edit profile
-
Navigate to Applications
- In the left sidebar, scroll down and click Applications
- Direct link:
https://gitlab.com/-/profile/applications
-
Create a New OAuth Application
- Click New Application
- Fill in:
- Name: e.g.,
My GitLab Integration - Redirect URI: Your OAuth callback URL (must be exact, no trailing
/) - Scopes: Select the permissions your app needs:
read_user— Read user profile infoapi— Full API accessread_api— Read-only API accessread_repository— Read repo datawrite_repository— Write repo dataopenid— OpenID Connectprofile— User profile via OpenIDemail— User email via OpenID
- Name: e.g.,
-
Save and Copy Credentials
- Click Save application
- GitLab will display:
- Application ID → This is your Client ID
- Secret → This is your Client Secret
- Copy the secret immediately — GitLab only shows it once!
Key Details
- GitLab.com: https://gitlab.com
- Applications Page: https://gitlab.com/-/profile/applications
- Auth Type: OAuth 2.0
- Authorization URL:
https://gitlab.com/oauth/authorize - Token URL:
https://gitlab.com/oauth/token - Base API URL:
https://gitlab.com/api/v4 - Credentials Location: User Settings → Applications → Application ID & Secret
- Available Scopes:
api,read_api,read_user,read_repository,write_repository,read_registry,write_registry,openid,profile,email,sudo - Note: For self-hosted GitLab instances, replace
gitlab.comwith your instance domain in all URLs