Skip to content

Latest commit

 

History

History
93 lines (58 loc) · 6.07 KB

File metadata and controls

93 lines (58 loc) · 6.07 KB

CustomerSessionSDK

(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

Parameter Type Required Description
security models.CustomerPortalCustomerSessionIntrospectSecurity ✔️ The security requirements to use for the request.
retries Optional[utils.RetryConfig] 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 ✔️ The security requirements to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.PortalAuthenticatedUser

Errors

Error Type Status Code Content Type
models.SDKError 4XX, 5XX */*