GitLab User Info API

Endpoints for retrieving authenticated user information via OAuth.

Operations 1

GET /oauth/userinfo GitLab Get Authenticated User Information #

Documentation

Specifications

Schemas & Data

Other Resources

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/gitlab-user-info-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

gitlab-user-info-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GitLab OAuth 2.0 User Info API
  description: The GitLab OAuth 2.0 API enables third-party services to access GitLab resources on behalf of users using the OAuth 2.0 protocol. It supports authorization code with PKCE, device authorization grant, and resource owner password credentials flows. Applications must first be registered in GitLab user settings before using these endpoints.
  version: '4'
  contact:
    name: GitLab Support
    url: https://about.gitlab.com/support/
  termsOfService: https://about.gitlab.com/terms/
servers:
- url: https://gitlab.com
  description: GitLab.com Production Server
tags:
- name: User Info
  description: Endpoints for retrieving authenticated user information via OAuth.
paths:
  /oauth/userinfo:
    get:
      operationId: getUserInfo
      summary: GitLab Get Authenticated User Information
      description: Returns profile information about the currently authenticated user based on the OAuth token's scopes. Implements the OpenID Connect UserInfo endpoint. Supports CORS for browser-based applications.
      tags:
      - User Info
      security:
      - oauthToken: []
      responses:
        '200':
          description: User information returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserInfo'
        '401':
          description: Invalid or expired token.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    UserInfo:
      type: object
      properties:
        sub:
          type: string
          description: Subject identifier. Unique to the user within the provider.
          example: example_value
        name:
          type: string
          description: Full name of the user.
          example: Example Project
        nickname:
          type: string
          description: The user's GitLab username.
          example: Example Project
        email:
          type: string
          format: email
          description: The user's email address. Requires the email scope.
          example: user@example.com
        email_verified:
          type: boolean
          description: Whether the user's email address has been verified.
          example: true
        profile:
          type: string
          format: uri
          description: URL to the user's GitLab profile page.
          example: example_value
        picture:
          type: string
          format: uri
          description: URL to the user's avatar image.
          example: example_value
        groups:
          type: array
          description: List of groups the user belongs to.
          items:
            type: string
  securitySchemes:
    oauthToken:
      type: http
      scheme: bearer
      description: OAuth 2.0 access token obtained via the authorization flow.
externalDocs:
  description: GitLab OAuth 2.0 API Documentation
  url: https://docs.gitlab.com/api/oauth2/