# Sonar Qube

### Prerequisites

* The server's IP address, where the agent will be running, must be whitelisted in SonarQube.

### Steps to integrate with SonarQube

1. Login to DevDynamics\\

   <figure><img src="https://4171758421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS4rgvJ71tpXan8RhYTT4%2Fuploads%2Fgit-blob-8d676ae0c89dbff0ff6c038c002733f9fa6925c8%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
2. From the Settings page, navigate to the integrations section from the left menu.\\

   <figure><img src="https://4171758421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS4rgvJ71tpXan8RhYTT4%2Fuploads%2Fgit-blob-8b86e97945742f7d46bd9d83da89c4aeb6e95b93%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
3. Click on Integrate SonarQube\\

   <figure><img src="https://4171758421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS4rgvJ71tpXan8RhYTT4%2Fuploads%2Fgit-blob-20c13e9515fe3491925eed729b8c83d51cb9e8f4%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
4. Enter the API Token and the hosted URL for the SonarQube application. \\

   <figure><img src="https://4171758421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS4rgvJ71tpXan8RhYTT4%2Fuploads%2Fgit-blob-2073bbc19986876dd23d6c15393fef2a3c7fbaf5%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### Steps to find API Token and Organization ID

{% hint style="info" %}
Make sure that you have an admin role to perform this action.
{% endhint %}

1. Go to Account and Security SonarQube\\

   <figure><img src="https://4171758421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS4rgvJ71tpXan8RhYTT4%2Fuploads%2Fgit-blob-2eed98be568c12eed405b5f6e661e6e8316fc70f%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
2. Enter a name for the token and select type as user token\*\*.\*\* Note that this token is viewable only once.\\
3. Paste the API token and the hosted URL in the DevDynamics integration modal and save.
