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

# Get the current user

> The account behind this token. Scoped separately from `data:schema` because connectors routinely call this right after an OAuth grant just to confirm the credential works.



## OpenAPI

````yaml /openapi.json get /users/me
openapi: 3.1.0
info:
  title: TeamDuo REST API
  version: 1.0.0
  description: >-
    The subset of TeamDuo's REST API that an API key may call. Most of TeamDuo's
    backend is session-only by design — connecting a database, changing
    exposure, and managing your team all require a signed-in browser session.
    These five endpoints are the ones a key can reach, matching the read-only
    surface the MCP connector uses. See [Overview](/api-reference/introduction)
    before using this reference.
servers:
  - url: https://api.teamduo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /users/me:
    get:
      tags:
        - Account
      summary: Get the current user
      description: >-
        The account behind this token. Scoped separately from `data:schema`
        because connectors routinely call this right after an OAuth grant just
        to confirm the credential works.
      operationId: getCurrentUser
      responses:
        '200':
          description: The current user.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  email:
                    type: string
                    format: email
                  name:
                    type:
                      - string
                      - 'null'
                  avatarUrl:
                    type:
                      - string
                      - 'null'
                  emailVerified:
                    type: boolean
                  createdAt:
                    type: string
                    format: date-time
                required:
                  - id
                  - email
                  - emailVerified
              example:
                id: cku4x6p2q0000ab12cd34ef56
                email: you@company.com
                name: Ada Lovelace
                avatarUrl: null
                emailVerified: true
                createdAt: '2026-06-01T12:00:00.000Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      security:
        - bearerAuth:
            - profile
components:
  responses:
    Unauthorized:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The token is valid but its scopes don't cover this route.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ScopeError'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable explanation. Always safe to show a user or an agent.
        code:
          type: string
          description: Stable machine-readable code, when the error has one.
      required:
        - error
    ScopeError:
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              const: SCOPE_REQUIRED
            requiredScope:
              type: string
              description: >-
                The scope this key is missing, when the route needs a specific
                one.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key (`sk_live_...`) created under Settings → API keys, or a
        short-lived JWT access token from a browser session. A key only reaches
        the scope it was granted; see [API keys and
        scopes](/reference/api-keys).

````