CustomerSessionSDK
January 20, 2026 ยท View on GitHub
(customer_portal.customer_session)
Overview
Available Operations
- introspect - Introspect Customer Session
- get_authenticated_user - Get Authenticated Portal User
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
| Parameter | Type | Required | Description |
|---|---|---|---|
security | models.CustomerPortalCustomerSessionIntrospectSecurity | :heavy_check_mark: | The security requirements to use for the request. |
retries | Optional[utils.RetryConfig] | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
Response
models.CustomerCustomerSession
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 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
| Parameter | Type | Required | Description |
|---|---|---|---|
security | models.CustomerPortalCustomerSessionGetAuthenticatedUserSecurity | :heavy_check_mark: | The security requirements to use for the request. |
retries | Optional[utils.RetryConfig] | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
Response
models.PortalAuthenticatedUser
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |