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

# Get Authenticated Portal User

> Get information about the currently authenticated portal user.

**Scopes**: `customer_portal:read` `customer_portal:write`



## OpenAPI

````yaml /openapi/2027-01.openapi.json get /v1/customer-portal/customer-session/user
openapi: 3.1.0
info:
  title: Polar API
  summary: Polar HTTP and Webhooks API
  description: >-
    Read the docs at https://polar.sh/docs/api-reference. See
    https://polar.sh/docs/api-reference/versioning for the API versioning and
    deprecation policy.
  version: 2027-01
servers:
  - url: https://api.polar.sh
    description: Production environment
    x-speakeasy-server-id: production
    x-polar-environment: production
  - url: https://sandbox-api.polar.sh
    description: Sandbox environment
    x-speakeasy-server-id: sandbox
    x-polar-environment: sandbox
security: []
tags:
  - name: public
    description: >-
      Endpoints shown and documented in the Polar API documentation and
      available in our SDKs.
  - name: private
    description: >-
      Endpoints that should appear in the schema only in development to generate
      our internal JS SDK.
  - name: mcp
    description: Endpoints supported by Polar's MCP server.
  - name: cli
    description: Endpoints exposed as commands by Polar's CLI.
externalDocs:
  description: API versioning and deprecation policy
  url: https://polar.sh/docs/api-reference/versioning
paths:
  /v1/customer-portal/customer-session/user:
    get:
      tags:
        - customer_portal
        - customer-session
        - public
      summary: Get Authenticated Portal User
      description: |-
        Get information about the currently authenticated portal user.

        **Scopes**: `customer_portal:read` `customer_portal:write`
      operationId: customer_portal:customer-session:get_authenticated_user
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortalAuthenticatedUser'
      security:
        - customer_session:
            - customer_portal:read
            - customer_portal:write
        - member_session:
            - customer_portal:read
            - customer_portal:write
      x-codeSamples:
        - lang: python
          source: >
            from polar.v2027_01 import Polar


            polar = Polar("polar_oat_xxx")


            response =
            polar.customer_portal.customer_session.get_authenticated_user()

            print(response)
        - lang: typescript
          source: >
            import { createPolar } from "@polar-sh/sdk/2027-01";


            const polar = createPolar({
              accessToken: "polar_oat_xxx",
            });


            const response = await
            polar.customerPortal.customerSession.getAuthenticatedUser();

            console.log(response);
components:
  schemas:
    PortalAuthenticatedUser:
      properties:
        type:
          type: string
          title: Type
          description: 'Type of authenticated user: ''customer'' or ''member'''
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: User's name, if available.
        email:
          type: string
          title: Email
          description: User's email address.
        customer_id:
          type: string
          format: uuid4
          title: Customer Id
          description: Associated customer ID.
        member_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Member Id
          description: Member ID. Only set for members.
        role:
          anyOf:
            - type: string
            - type: 'null'
          title: Role
          description: Member role (owner, billing_manager, member). Only set for members.
      type: object
      required:
        - type
        - name
        - email
        - customer_id
      title: PortalAuthenticatedUser
      description: Information about the authenticated portal user.
  securitySchemes:
    customer_session:
      type: http
      description: >-
        Customer session tokens are specific tokens that are used to
        authenticate customers on your organization. You can create those
        sessions programmatically using the [Create Customer Session
        endpoint](/api-reference/customer-sessions/create-customer-session).
      scheme: bearer
    member_session:
      type: http
      description: >-
        Member session tokens are specific tokens that are used to authenticate
        members on your organization. You can create those sessions
        programmatically using the [Create Member Session
        endpoint](/api-reference/customer-sessions/create-customer-session).
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.