WorkOS PHP SDK

ConnectedAccountInput
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.
$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.

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

$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

Methods

__construct()

public __construct([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
$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
self

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

toArray()

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

Search results