Sonar User Tokens API

API token generation and management

Operations 2

GET /user_tokens/search Search User Tokens #
POST /user_tokens/generate Generate User Token #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sonar-user-tokens-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sonar-user-tokens-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SonarCloud Issues User Tokens API
  description: The SonarCloud API provides HTTP endpoints for programmatic interaction with SonarCloud — Sonar's cloud-based code quality and security analysis service. It enables management of organizations, projects, quality gates, issues, and analysis integrations with GitHub, GitLab, Bitbucket, and Azure DevOps. Token-based authentication is required for all endpoints.
  version: 1.0.0
  contact:
    name: SonarSource
    url: https://community.sonarsource.com/
  license:
    name: GNU Lesser General Public License v3.0
    url: https://www.gnu.org/licenses/lgpl-3.0.html
servers:
- url: https://sonarcloud.io/api
  description: SonarCloud API
tags:
- name: User Tokens
  description: API token generation and management
paths:
  /user_tokens/search:
    get:
      operationId: searchUserTokens
      summary: Search User Tokens
      description: List the user tokens associated with the authenticated user account. Returns token names and creation dates (not the actual token values).
      tags:
      - User Tokens
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Successfully retrieved user tokens
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserTokenSearchResponse'
        '401':
          description: Unauthorized
  /user_tokens/generate:
    post:
      operationId: generateUserToken
      summary: Generate User Token
      description: Generate a new user token for API authentication. The token value is returned only once and must be stored securely. Tokens can be scoped to specific organizations.
      tags:
      - User Tokens
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - name
              properties:
                name:
                  type: string
                  description: Token name
                organizationKey:
                  type: string
                  description: Scope token to a specific organization
      responses:
        '200':
          description: Token generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserToken'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
components:
  schemas:
    UserTokenSearchResponse:
      type: object
      properties:
        login:
          type: string
        userTokens:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              createdAt:
                type: string
                format: date-time
    UserToken:
      type: object
      properties:
        login:
          type: string
        name:
          type: string
        token:
          type: string
          description: Token value — only returned once at generation time
        createdAt:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: SonarCloud user token. Generate at https://sonarcloud.io/account/security. Pass as Bearer token or as basic auth username with empty password.