# Troubleshooting SonarQube API token

**URL:** <https://community.sonarsource.com/t/troubleshooting-sonarqube-api-token/188764>\
**Category:** SonarQube Server / Community Build\
**Tags:** authorization\
**Created:** [September 24, 2026, 1:02pm UTC](https://community.sonarsource.com/t/troubleshooting-sonarqube-api-token/188764 "2026-09-24T13:02:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KUSHAL](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/kushal/32/66176_2.png) [@KUSHAL](https://community.sonarsource.com/u/KUSHAL)\
**Post date:** [September 24, 2026, 1:02pm UTC](https://community.sonarsource.com/t/troubleshooting-sonarqube-api-token/188764/1 "2026-09-24T13:02:18Z")

</div>

Hey @andres ,

Thanks for the guidence,

I followed you instructions from above.

I am observing different behavior between two SonarQube Community Build instances when querying the API using a **Global Analysis Token (`sqa_...`)**:

### Environment Details:

- **Server A:** SonarQube Community Build **v25.5.0.107428 (MQR Mode)**
- **Server B:** SonarQube Community Build **v25.2.0.102705 (MQR Mode)**

### Configuration (Identical on both servers):

1. Both instances have a **Global Analysis Token (`sqa_...`)** generated under the `admin` user account.
2. The `admin` user has **`Administer System`**.
3. The projects on both servers are set to **`Private`**.
4. Both servers use this tokens in a CI/CD pipeline for:
  - Running `sonar-scanner` analysis (works on both)

  - Fetching project metrics via REST API after Quality Gate evaluation:

### Problem / Behavior:

- **On Server A (v25.5.0):** The API call with the Global Analysis Token returns **`HTTP 200 OK`** with all requested measures as expected.

- **On Server B (v25.2.0):** The exact same API call with the Global Analysis Token fails with **`HTTP 403 Forbidden`** :

### Questions:

1. Was there an intentional change in permission scoping for **Global Analysis Tokens** between **v25.2** and **v25.5** that allows them to query `/api/measures/component` on private projects in newer builds?
2. For v25.2, is there a specific permission setting required to allow a Global Analysis Token to read measures, or is a User Token (`squ_...`) strictly required in that version?  
Please let me known how can i troubleshoot this problem

Thank you

---

<div class="post-metadata">

**Author:** ![KUSHAL](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/kushal/32/66176_2.png) [@KUSHAL](https://community.sonarsource.com/u/KUSHAL)\
**Post date:** [September 25, 2026, 3:50am UTC](https://community.sonarsource.com/t/troubleshooting-sonarqube-api-token/188764/2 "2026-09-25T03:50:06Z")

</div>

Hey @andres ,

can you help me out in this or else any other can help me in this

---

<div class="post-metadata">

**Author:** ![andres](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/andres/32/76342_2.png) [@andres](https://community.sonarsource.com/u/andres)\
**Post date:** [September 25, 2026, 9:31am UTC](https://community.sonarsource.com/t/troubleshooting-sonarqube-api-token/188764/3 "2026-09-25T09:31:40Z")

</div>

Hey @KUSHAL, I took the liberty to split your reply in [the other thread](https://community.sonarsource.com/t/can-jenkins-upload-sonarqube-analysis-reports-to-aws-s3-without-using-curl/188291) into a new post, because it was unrelated to your original question. [We prefer to keep topics (meaning, Community posts) focused around a single subject](https://community.sonarsource.com/guidelines#one-subject).

That being said, regarding this question: I’m not aware of that specific change between those 2 versions, but in principle, analysis tokens should only be valid for analysis-related endpoints. `GET /api/measures/component` should not succeed. Could you double-check that you’re using an analysis token for that one? Could you try generating a branch new analysis token and retrying the request, perhaps from your machine instead of the CI?

In any case, you’re running an outdated version of SonarQube Community Build in both servers, so in the event that there was indeed a bug and not simply a misconfiguration, we would only investigate it if you are able to reproduce it on the latest version (26.9). I recommend you [update the instance](https://docs.sonarsource.com/sonarqube-community-build/server-update-and-maintenance/update/roadmap).

---

<div class="post-metadata">

**Author:** ![andres](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/andres/32/76342_2.png) [@andres](https://community.sonarsource.com/u/andres)\
**Post date:** [September 29, 2026, 8:57am UTC](https://community.sonarsource.com/t/troubleshooting-sonarqube-api-token/188764/4 "2026-09-29T08:57:26Z")

</div>

Split this topic on September 29, 2026, 8:57am UTC

A post was split to a new topic: [SonarQube startup issues](https://community.sonarsource.com/t/sonarqube-startup-issues/189058)
