> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datalinks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the current user

> Returns the identity of the authenticated user resolved from the presented bearer token.



## OpenAPI

````yaml /api-reference/openapi.yml get /user/me
openapi: 3.0.3
info:
  title: DataLinks
  version: 2.21.1
servers:
  - url: https://api.datalinks.com/api/v1
    description: production server
security:
  - bearerAuth: []
  - openId:
      - implicit
paths:
  /user/me:
    get:
      tags:
        - user
      summary: Get the current user
      description: >-
        Returns the identity of the authenticated user resolved from the
        presented bearer token.
      operationId: getCurrentUser
      responses:
        '200':
          description: Returns the current user's identity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrentUserResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    CurrentUserResponse:
      required:
        - id
        - username
      type: object
      properties:
        id:
          type: string
        username:
          type: string
        name:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
    ErrorResponse:
      required:
        - error_code
        - message
      type: object
      properties:
        error_code:
          type: string
          example: UNAUTHORIZED
        error_message:
          type: string
          example: ''
        message:
          type: string
          example: Missing authentication token
        sub_errors:
          type: array
          items:
            required:
              - code
              - message
            type: object
            properties:
              code:
                type: string
              message:
                type: string
  responses:
    Unauthorized:
      description: >-
        Unauthorized. This error occurs if the authentication token is missing
        or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      description: >
        Use a Bearer token for authentication. Submit the token using the
        `Authorization`

        header: `Authorization: Bearer <token>`.
      scheme: bearer
    openId:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: >-
            https://login.datalinks.com/realms/datalinks-realm/protocol/openid-connect/auth
          scopes:
            openid: openid

````