- introspect - Introspect Customer Session
- getAuthenticatedUser - Get Authenticated Portal User
Introspect the current session and return its information.
Scopes: customer_portal:read customer_portal:write
declare(strict_types=1);
require 'vendor/autoload.php';
use Polar;
use Polar\Models\Operations;
$sdk = Polar\Polar::builder()->build();
$requestSecurity = new Operations\CustomerPortalCustomerSessionIntrospectSecurity(
customerSession: '<YOUR_BEARER_TOKEN_HERE>',
);
$response = $sdk->customerPortal->customerSession->introspect(
security: $requestSecurity
);
if ($response->customerCustomerSession !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
security |
Operations\CustomerPortalCustomerSessionIntrospectSecurity | ✔️ | The security requirements to use for the request. |
?Operations\CustomerPortalCustomerSessionIntrospectResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\APIException | 4XX, 5XX | */* |
Get information about the currently authenticated portal user.
Scopes: customer_portal:read customer_portal:write
declare(strict_types=1);
require 'vendor/autoload.php';
use Polar;
use Polar\Models\Operations;
$sdk = Polar\Polar::builder()->build();
$requestSecurity = new Operations\CustomerPortalCustomerSessionGetAuthenticatedUserSecurity(
customerSession: '<YOUR_BEARER_TOKEN_HERE>',
);
$response = $sdk->customerPortal->customerSession->getAuthenticatedUser(
security: $requestSecurity
);
if ($response->portalAuthenticatedUser !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
security |
Operations\CustomerPortalCustomerSessionGetAuthenticatedUserSecurity | ✔️ | The security requirements to use for the request. |
?Operations\CustomerPortalCustomerSessionGetAuthenticatedUserResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\APIException | 4XX, 5XX | */* |