WorkOS PHP SDK

DataIntegrationsListResponseDataConnectedAccount
in package
implements JsonSerializable uses JsonSerializableTrait

Read onlyYes

The user's compatibility [connected account](https://workos.com/docs/reference/pipes/connected-account) for this provider, or `null` when the compatibility slot is empty. This legacy field never selects a standard connection.

Table of Contents

Interfaces

JsonSerializable

Properties

$accountDisplayName  : string|null
A mutable, non-unique display name for the provider account connection.
$accountIdentifier  : string|null
A best-effort identifier for the provider account this connection points at. It is correlation metadata, not the connection identifier or a selector.
$apiKeyLast4  : string|null
The last four characters of the API key, or `null` for OAuth connections.
$authMethod  : DataIntegrationAuthMethods|null
The authentication method used for this connection (`oauth`, `api_key`, or `client_credentials`). Defaults to `oauth` if absent.
$clientId  : string|null
The client ID supplied for this connection. Only present when `auth_method` is `client_credentials`.
$clientSecretLast4  : string|null
The last four characters of the client secret supplied for this connection, or `null` when it can't be read. Only present when `auth_method` is `client_credentials`.
$config  : array<string, string>|null
The connection-level configuration values stored for this connection — the fields the provider declares at `installation` scope, excluding secret and undeclared fields. Returned for every authentication method; empty when no stored values can be disclosed.
$connectionRole  : ConnectedAccountConnectionRole
Whether this row is the compatibility connection visible to undeclared clients or a standard peer for plural-aware clients. The role does not indicate preference or creation order.
$createdAt  : string
The timestamp when the connection was created.
$establishedByUserId  : string|null
The [User](https://workos.com/docs/reference/authkit/user) whose authorization established this connection. `null` when the connection is developer-managed or its establisher is unknown, and when the establishing member lost access to the organization — in which case `state_reason` is `establishing_member_membership_ended`.
$id  : string
The unique identifier of the connected account.
$object  : string
Distinguishes the connected account object.
$organizationId  : string|null
The [Organization](https://workos.com/docs/reference/organization) identifier associated with this connection, or `null` if not scoped to an organization.
$scopes  : array<string|int, string>
The OAuth scopes granted for this connection.
$state  : ConnectedAccountState
The state of the connected account: - `connected`: The connection is active and tokens are valid.
$stateReason  : string|null
Why WorkOS put the connection in its current `state`, or `null` when there is no WorkOS-recorded reason: - `establishing_member_membership_ended`: The member who established this organization-owned connection is no longer an active member of the organization, so its credentials were cleared. An organization admin must provide new credentials.
$updatedAt  : string
The timestamp when the connection was last updated.
$userId  : string|null
The [User](https://workos.com/docs/reference/authkit/user) identifier associated with this connection.
$userlandUserId  : string|null
Use `user_id` instead.
$warnings  : array<string|int, DataIntegrationsListResponseDataConnectedAccountWarning>|null
Non-blocking warnings about an explicitly supplied label. Only writes return it, and only when another connection already uses the label; reads omit it.

Methods

__construct()  : mixed
fromArray()  : self
jsonSerialize()  : array<string|int, mixed>|stdClass
toArray()  : array<string|int, mixed>

Properties

$accountIdentifier

A best-effort identifier for the provider account this connection points at. It is correlation metadata, not the connection identifier or a selector.

public string|null $accountIdentifier

$clientSecretLast4

The last four characters of the client secret supplied for this connection, or `null` when it can't be read. Only present when `auth_method` is `client_credentials`.

public string|null $clientSecretLast4 = null

$config

The connection-level configuration values stored for this connection — the fields the provider declares at `installation` scope, excluding secret and undeclared fields. Returned for every authentication method; empty when no stored values can be disclosed.

public array<string, string>|null $config = null

$establishedByUserId

The [User](https://workos.com/docs/reference/authkit/user) whose authorization established this connection. `null` when the connection is developer-managed or its establisher is unknown, and when the establishing member lost access to the organization — in which case `state_reason` is `establishing_member_membership_ended`.

public string|null $establishedByUserId = null

$organizationId

The [Organization](https://workos.com/docs/reference/organization) identifier associated with this connection, or `null` if not scoped to an organization.

public string|null $organizationId

$state

The state of the connected account: - `connected`: The connection is active and tokens are valid.

public ConnectedAccountState $state
  • needs_reauthorization: The user needs to reauthorize the connection, typically because required scopes have changed. state_reason explains why when WorkOS invalidated the connection itself.
  • disconnected: The connection has been disconnected.

$stateReason

Why WorkOS put the connection in its current `state`, or `null` when there is no WorkOS-recorded reason: - `establishing_member_membership_ended`: The member who established this organization-owned connection is no longer an active member of the organization, so its credentials were cleared. An organization admin must provide new credentials.

public string|null $stateReason = null

Additional values may be added; treat an unrecognized value as an unknown reason.

Methods

__construct()

public __construct(string $object, string $id, ConnectedAccountConnectionRole $connectionRole, string|null $accountIdentifier, string|null $accountDisplayName, string|null $userId, string|null $organizationId, array<string|int, mixed> $scopes, ConnectedAccountState $state, string $createdAt, string $updatedAt, string|null $userlandUserId[, DataIntegrationAuthMethods|null $authMethod = null ][, string|null $apiKeyLast4 = null ][, string|null $clientId = null ][, string|null $clientSecretLast4 = null ][, array<string|int, mixed>|null $config = null ][, string|null $establishedByUserId = null ][, string|null $stateReason = null ][, array<string|int, mixed>|null $warnings = null ]) : mixed
Parameters
$object : string
$id : string
$connectionRole : ConnectedAccountConnectionRole
$accountIdentifier : string|null
$accountDisplayName : string|null
$userId : string|null
$organizationId : string|null
$scopes : array<string|int, mixed>
$state : ConnectedAccountState
$createdAt : string
$updatedAt : string
$userlandUserId : string|null
$authMethod : DataIntegrationAuthMethods|null = null
$apiKeyLast4 : string|null = null
$clientId : string|null = null
$clientSecretLast4 : string|null = null
$config : array<string|int, mixed>|null = null
$establishedByUserId : string|null = null
$stateReason : string|null = null
$warnings : array<string|int, mixed>|null = null

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>|stdClass
Return values
array<string|int, mixed>|stdClass
On this page

Search results