Set up the GitLab spoke
Integrate your ServiceNow instance and the GitLab by creating a custom OAuth application in the GitLab.
Before you begin
- Request an Integration Hub subscription.
- Activate the GitLab spoke.
- Create an account with GitLab at https://gitlab.com/users/sign_in.
- Role required: admin.
Add GitLab token
Add GitLab token to authenticate requests from your ServiceNow instance.
Before you begin
Role required: admin.
Procedure
-
Navigate to All > GitLab Token Management > GitLab Token Managements.
-
Click New.
-
On the form, fill these values.
Field Description Secret Secret created during the GitLab application configuration. Name Name to identify the record. OAuth Entity Profile Leave the field empty. System auto-assigns the default entity profile after the connection is configured. -
Right-click the form header and click Save.
-
Click Generate Secure Token.
Value of the generated secure token is displayed.
-
Copy and record the value of the secure token for later use.
-
Click Update.
Create OAuth application in GitLab account
Create a custom OAuth application from your GitLab account to enable OAuth 2.0 authentication with the GitLab spoke.
Before you begin
- GitLab account
- Role required: GitLab admin.
About this task
Complete these steps from your GitLab account. See the GitLab documentation for instructions on creating and configuring applications.
Procedure
-
From your GitLab account, create an application.
-
Enter ServiceNow instance URL in Redirect URI.
The format of the redirect URL is:
https://<instance-name>.service-now.com/api/sn_gitlab_spoke/gitlab_oauth_redirect/oauth?secureToken=<Secure-Token>.Replace <Instance-Name> with the name of your ServiceNow instance and replace <Secure-Token> with the secure token you had generated in the ServiceNow instance.
-
Copy and record the Application Id and Secret for later use.
These details are required to register the application as a third-party OAuth provider on your ServiceNow instance.
Result
The custom OAuth application from your GitLab account is created and can be integrated with the ServiceNow instance.
Configure a connection for the GitLab spoke
Add and configure a GitLab connection to authenticate ServiceNow requests in GitLab spoke.
Before you begin
Role required: admin.
Procedure
-
Navigate to All > Process Automation > Workflow Studio.
-
Click the Integrations tab.
-
Under Connections, the Outbound connections are displayed by default.
-
Locate the alias for Gitlab and click View Details.
[Omitted image "gitlab-connection.png"] Alt text: Connection for the GitLab spoke.
To manage more than one GitLab connection record, create a new child alias record by selecting Add Connection. For more information about using multiple connections, see Supporting multiple connections.
-
Click Edit or if you are configuring the spoke for the first time, click Configure.
[Omitted image "gitlab-connection-conf.png"] Alt text: Initial connection configuration.
-
On the Connection form, fill in the fields.
|
Field |
Description |
|---|---|
|
Connection Information | |
|
Connection Name |
Name to uniquely identify the connection. |
|
Connection URL |
Enter |
|
Credential Information | |
|
OAuth Entity Name |
Name to identify the OAuth entity record. |
|
OAuth Client ID |
Application ID created during the GitLab application configuration. |
|
OAuth Client Secret |
Secret created during the GitLab application configuration. |
|
OAuth Redirect URL |
OAuth callback endpoint. The format of the redirect URL is: |
- Click Save and Get OAuth Token.
---
title: Set up the GitLab spoke
description: Integrate your ServiceNow instance and the GitLab by creating a custom OAuth application in the GitLab.Add GitLab token to authenticate requests from your ServiceNow instance.Create a custom OAuth application from your GitLab account to enable OAuth 2.0 authentication with the GitLab spoke.Add and configure a GitLab connection to authenticate ServiceNow requests in GitLab spoke.
locale: en-US
canonical_url: https://www.servicenow.com/docs/r/integrate-applications/integration-hub/setup-gitlab-spoke.html
release: brazil
product: Integration Hub
classification: integration-hub
topic_type: task
last_updated: "2026-03-12"
reading_time_minutes: 2
breadcrumb: [GitLab Spoke, Integration Hub spokes, Build integrations, Integration Hub, Workflow Data Fabric]
---
# Set up the GitLab spoke
Integrate your ServiceNow instance and the GitLab by creating a custom OAuth application in the GitLab.
## Before you begin
- Request an Integration Hub subscription.
- Activate the GitLab spoke.
- Create an account with GitLab at [https://gitlab.com/users/sign\_in](https://gitlab.com/users/sign_in).
- Role required: admin.
## Add GitLab token
Add GitLab token to authenticate requests from your ServiceNow instance.
### Before you begin
Role required: admin.
### Procedure
1. Navigate to **All** > **GitLab Token Management** > **GitLab Token Managements**.
2. Click **New**.
3. On the form, fill these values.
|Field|Description|
|-----|-----------|
|Secret|Secret created during the GitLab application configuration.|
|Name|Name to identify the record.|
|OAuth Entity Profile|Leave the field empty. System auto-assigns the default entity profile after the connection is configured.|
4. Right-click the form header and click **Save**.
5. Click **Generate Secure Token**.
Value of the generated secure token is displayed.
6. Copy and record the value of the secure token for later use.
7. Click **Update**.
## Create OAuth application in GitLab account
Create a custom OAuth application from your GitLab account to enable OAuth 2.0 authentication with the GitLab spoke.
### Before you begin
- GitLab account
- Role required: GitLab admin.
### About this task
Complete these steps from your GitLab account. See the [GitLab](https://docs.gitlab.com/ee/README.html) documentation for instructions on creating and configuring applications.
### Procedure
1. From your GitLab account, create an application.
2. Enter ServiceNow instance URL in **Redirect URI**.
The format of the redirect URL is: `https://<instance-name>.service-now.com/api/sn_gitlab_spoke/gitlab_oauth_redirect/oauth?secureToken=<Secure-Token>`.
Replace **<Instance-Name>** with the name of your ServiceNow instance and replace **<Secure-Token>** with the secure token you had generated in the ServiceNow instance.
3. Copy and record the **Application Id** and **Secret** for later use.
These details are required to register the application as a third-party OAuth provider on your ServiceNow instance.
### Result
The custom OAuth application from your GitLab account is created and can be integrated with the ServiceNow instance.
## Configure a connection for the GitLab spoke
Add and configure a GitLab connection to authenticate ServiceNow requests in GitLab spoke.
### Before you begin
Role required: admin.
### Procedure
1. Navigate to **All** > **Process Automation** > **Workflow Studio**.
2. Click the **Integrations** tab.
3. Under **Connections**, the **Outbound** connections are displayed by default.
4. Locate the alias for **Gitlab** and click **View Details**.
\[Omitted image "gitlab-connection.png"\] Alt text: Connection for the GitLab spoke.
To manage more than one GitLab connection record, create a new child alias record by selecting **Add Connection**. For more information about using multiple connections, see [Supporting multiple connections](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/integrate-applications/integration-hub/support-multiple-connections.md).
5. Click **Edit** or if you are configuring the spoke for the first time, click **Configure**.
\[Omitted image "gitlab-connection-conf.png"\] Alt text: Initial connection configuration.
6. On the **Connection** form, fill in the fields.
<table id="table_tfv_3d5_h5b"><thead><tr><th>
Field
</th><th>
Description
</th></tr></thead><tbody><tr><td colspan="2">
Connection Information
</td></tr><tr><td>
Connection Name
</td><td>
Name to uniquely identify the connection.
</td></tr><tr><td>
Connection URL
</td><td>
Enter `https://gitlab.com/api`.**Note:** If you have installed GitLab on an on-premise server, enter the URL in this format: `https://<gitlab-hosted-instance>.com/api`
</td></tr><tr><td colspan="2">
Credential Information
</td></tr><tr><td>
OAuth Entity Name
</td><td>
Name to identify the OAuth entity record.
</td></tr><tr><td>
OAuth Client ID
</td><td>
Application ID created during the GitLab application configuration.
</td></tr><tr><td>
OAuth Client Secret
</td><td>
Secret created during the GitLab application configuration.
</td></tr><tr><td>
OAuth Redirect URL
</td><td>
OAuth callback endpoint. The format of the redirect URL is: `https://<instance-name>.service-now.com/api/sn_gitlab_spoke/gitlab_oauth_redirect/oauth?secureToken=<Secure-Token>`.Replace **<Instance-Name>** with the name of your ServiceNow instance and replace **<Secure-Token>** with the secure token you had generated in the ServiceNow instance.
</td></tr></tbody>
</table> \[Omitted image "gitlab-conf-temp.png"\] Alt text: Configure a connection for the GitLab spoke.
7. Click **Save and Get OAuth Token**.
| title | Set up the GitLab spoke |
| description | Integrate your ServiceNow instance and the GitLab by creating a custom OAuth application in the GitLab.Add GitLab token to authenticate requests from your ServiceNow instance.Create a custom OAuth application from your GitLab account to enable OAuth 2.0 authentication with the GitLab spoke.Add and configure a GitLab connection to authenticate ServiceNow requests in GitLab spoke. |
| locale | en-US |
| canonical_url | https://www.servicenow.com/docs/r/integrate-applications/integration-hub/setup-gitlab-spoke.html |
| release | brazil |
| product | Integration Hub |
| classification | integration-hub |
| topic_type | task |
| last_updated | 2026-03-12 |
| reading_time_minutes | 2 |
| breadcrumb | GitLab SpokeIntegration Hub spokesBuild integrationsIntegration HubWorkflow Data Fabric |