# Code Scanning With a Personal Access Token

### ⚠️ Disclaimer

For **Gitlab Premium & Gitlab Ultimate** users we recommend using [Gitlab Service Accounts](https://help.aikidogov.us/pr-and-release-gating/gitlab-mr-gating/gitlab-server-ci-mr-gating-via-aikido-dashboard-with-a-service-account-token). In case you would use this approach, make sure to setup an integration user that is called AikidoSec.

### Introduction

You can both use personal access or group tokens (Gitlab Premium required). Aikido will use these to perform the code scanning. You can update this token on [this page](https://app.aikido.dev/onboarding/gitlab/update-workspace-access-token).<br>

<figure><img src="https://help.aikidogov.us/_assets/e7e6679fc116/image-392.png" alt=""><figcaption></figcaption></figure>

### Creating a Personal Access or Group Access Token <a href="#creating-a-personal-access-token" id="creating-a-personal-access-token"></a>

Gitlab cloud supports several different personal access tokens, which all work the same way. We usually recommend to create a group PAT, but for Gitlab cloud this is only possible for premium customers.

1. Navigate to the **Token settings page**
   1.  For a **group access token**: Go to you group page > Settings > Access Tokens<br>

       <figure><img src="https://help.aikidogov.us/_assets/196bd64e5c95/image-3.png" alt=""><figcaption></figcaption></figure>
   2. For a **personal access token**: Go to your profile page > User settings > Access Tokens
2. Click on "**Add new token**"
3.  Enter a name for the token, remove the expiration date and select the **read\_api, read\_user and read\_repository** scope<br>

    <figure><img src="https://help.aikidogov.us/_assets/4aa57343564f/Scherm-afbeelding-2025-12-11-om-12.11.34.png" alt=""><figcaption></figcaption></figure>
4. Click on "**Create token**"
5.  Copy the token and enter it into the input field on the update access token page of Aikido<br>

    <figure><img src="https://help.aikidogov.us/_assets/42231958c2ca/Scherm-afbeelding-2025-12-11-om-12.15.09.png" alt=""><figcaption></figcaption></figure>
