CustomerSessionSDK

January 20, 2026 ยท View on GitHub

(customer_portal.customer_session)

Overview

Available Operations

introspect

Introspect the current session and return its information.

Scopes: customer_portal:read customer_portal:write

Example Usage

import polar_sdk
from polar_sdk import Polar


with Polar() as polar:

    res = polar.customer_portal.customer_session.introspect(security=polar_sdk.CustomerPortalCustomerSessionIntrospectSecurity(
        customer_session="<YOUR_BEARER_TOKEN_HERE>",
    ))

    # Handle response
    print(res)

Parameters

ParameterTypeRequiredDescription
securitymodels.CustomerPortalCustomerSessionIntrospectSecurity:heavy_check_mark:The security requirements to use for the request.
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.CustomerCustomerSession

Errors

Error TypeStatus CodeContent Type
models.SDKError4XX, 5XX*/*

get_authenticated_user

Get information about the currently authenticated portal user.

Scopes: customer_portal:read customer_portal:write

Example Usage

import polar_sdk
from polar_sdk import Polar


with Polar() as polar:

    res = polar.customer_portal.customer_session.get_authenticated_user(security=polar_sdk.CustomerPortalCustomerSessionGetAuthenticatedUserSecurity(
        customer_session="<YOUR_BEARER_TOKEN_HERE>",
    ))

    # Handle response
    print(res)

Parameters

ParameterTypeRequiredDescription
securitymodels.CustomerPortalCustomerSessionGetAuthenticatedUserSecurity:heavy_check_mark:The security requirements to use for the request.
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.PortalAuthenticatedUser

Errors

Error TypeStatus CodeContent Type
models.SDKError4XX, 5XX*/*