Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.alterauth.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Use GitLab credentials to make authenticated API calls through Alter Vault without exposing your API keys in code.
PropertyValue
Provider IDgitlab
CategoryDeveloper Tools
Credential TypeAPI Key

Step 1: Get Your Credentials

1

Log in to GitLab

Log in to GitLab at gitlab.com.
2

Go to User Settings → Access Tokens

Go to User Settings → Access Tokens at gitlab.com/-/user_settings/personal_access_tokens.
3

Add a new token

Click ‘Add new token’, set name, expiration, and scopes.
4

Copy your token

Copy the generated token.
5

Enter hostname if self-hosted

If using a self-hosted instance, enter the hostname in the GitLab Hostname field.
Never share your credentials publicly. Store them securely and only enter them in the Alter Vault Developer Portal.

Step 2: Add to Alter Vault

1

Open the Developer Portal

Go to portal.alterauth.com and navigate to your app.
2

Add GitLab

Go to Managed Secrets > Add Provider > GitLab.
3

Enter your credentials

Paste your Personal Access Token into the credential field. If using a self-hosted instance, also enter your GitLab hostname in the GitLab Hostname field.
4

Save

Click Save. You’ll receive a grant_id to use with the SDK.

Using in Code

response = await vault.request(
    HttpMethod.GET,
    "https://YOUR_GITLAB_HOST/api/v4/projects",
    grant_id="YOUR_GRANT_ID",  # Use gitlab.com for cloud or your self-hosted hostname
)