OrganizationConnectedAccount
in package
implements
JsonSerializable
uses
JsonSerializableTrait
Read onlyYes
Table of Contents
Interfaces
- JsonSerializable
Properties
- $accessToken : string|null
- The OAuth access token for the connected account.
- $accountDisplayName : string|null
- A mutable, non-unique connection label; null clears it. Not an account identifier.
- $accountIdentifier : string|null
- A developer-attested account identifier; null clears it.
- $expiresAt : DateTimeImmutable|null
- The ISO-8601 timestamp when the access token expires. Required when `access_token` is provided for tokens that expire.
- $refreshToken : string|null
- The OAuth refresh token for the connected account.
- $scopes : array<string|int, string>|null
- The OAuth scopes granted for this connection.
- $state : PipeConnectedAccountState|null
- Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided.
- $userId : string
- The [User](https://workos.com/docs/reference/authkit/user) identifier of the organization member on whose behalf the connected account is being imported or updated. The user must be an active member of the organization.
Methods
- __construct() : mixed
- fromArray() : self
- jsonSerialize() : array<string|int, mixed>
- toArray() : array<string|int, mixed>
Properties
$accessToken
The OAuth access token for the connected account.
public
string|null
$accessToken
= null
$accountDisplayName
A mutable, non-unique connection label; null clears it. Not an account identifier.
public
string|null
$accountDisplayName
= null
$accountIdentifier
A developer-attested account identifier; null clears it.
public
string|null
$accountIdentifier
= null
$expiresAt
The ISO-8601 timestamp when the access token expires. Required when `access_token` is provided for tokens that expire.
public
DateTimeImmutable|null
$expiresAt
= null
$refreshToken
The OAuth refresh token for the connected account.
public
string|null
$refreshToken
= null
$scopes
The OAuth scopes granted for this connection.
public
array<string|int, string>|null
$scopes
= null
$state
Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided.
public
PipeConnectedAccountState|null
$state
= null
$userId
The [User](https://workos.com/docs/reference/authkit/user) identifier of the organization member on whose behalf the connected account is being imported or updated. The user must be an active member of the organization.
public
string
$userId
Methods
__construct()
public
__construct(string $userId[, string|null $accountDisplayName = null ][, string|null $accountIdentifier = null ][, string|null $accessToken = null ][, string|null $refreshToken = null ][, DateTimeImmutable|null $expiresAt = null ][, array<string|int, mixed>|null $scopes = null ][, PipeConnectedAccountState|null $state = null ]) : mixed
Parameters
- $userId : string
- $accountDisplayName : string|null = null
- $accountIdentifier : string|null = null
- $accessToken : string|null = null
- $refreshToken : string|null = null
- $expiresAt : DateTimeImmutable|null = null
- $scopes : array<string|int, mixed>|null = null
- $state : PipeConnectedAccountState|null = null
fromArray()
public
static fromArray(array<string|int, mixed> $data) : self
Parameters
- $data : array<string|int, mixed>
Return values
selfjsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>toArray()
public
toArray() : array<string|int, mixed>