WorkOS PHP SDK

DataIntegrationVendedCredential
in package
implements JsonSerializable uses JsonSerializableTrait

Read onlyYes

Table of Contents

Interfaces

JsonSerializable

Properties

$authMethod  : string|null
The authentication method for this credential. Additional values may be added in the future; handle unknown values gracefully.
$config  : array<string, string>|null
Provider-declared, non-secret config from the installation snapshot, with current defaults for unset fields. Includes both integration- and installation-scope fields; omits undeclared fields and fields marked secret. Use these values to address a per-tenant host, such as Snowflake's `account` or Zendesk's `subdomain`. Empty when no values are disclosable. Changes to integration or organization pins require reconnecting or explicitly rebinding the connection. Defaults are live and can differ from a cached token's audience until refresh or re-mint.
$expiresAt  : string|null
The ISO-8601 formatted timestamp indicating when the credential expires, or `null` if it does not expire. Present for `oauth` and `client_credentials` credentials; absent for `api_key`.
$metadata  : array<string, mixed>|null
Non-sensitive fields captured from the provider token response (e.g. Salesforce `instance_url`), as configured for the provider. Captured on OAuth code exchange and refresh, and on each `client_credentials` mint. A field a later OAuth refresh omits keeps its stored value. Present for `oauth` and `client_credentials` credentials; absent for `api_key`.
$missingScopes  : array<string|int, string>|null
If the integration has requested scopes that aren't present on the access token, they're listed here. Present for `oauth` and `client_credentials` credentials; absent for `api_key`.
$object  : string|null
Distinguishes the credential object.
$scopes  : array<string|int, string>|null
The scopes granted to the access token. Present for `oauth` and `client_credentials` credentials; absent for `api_key`.
$value  : string|null
The vended secret. An OAuth access token when `auth_method` is `oauth`, the API key when `api_key`, or the client-credentials access token when `client_credentials`.

Methods

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

Properties

$authMethod

The authentication method for this credential. Additional values may be added in the future; handle unknown values gracefully.

public string|null $authMethod = null

$config

Provider-declared, non-secret config from the installation snapshot, with current defaults for unset fields. Includes both integration- and installation-scope fields; omits undeclared fields and fields marked secret. Use these values to address a per-tenant host, such as Snowflake's `account` or Zendesk's `subdomain`. Empty when no values are disclosable. Changes to integration or organization pins require reconnecting or explicitly rebinding the connection. Defaults are live and can differ from a cached token's audience until refresh or re-mint.

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

$expiresAt

The ISO-8601 formatted timestamp indicating when the credential expires, or `null` if it does not expire. Present for `oauth` and `client_credentials` credentials; absent for `api_key`.

public string|null $expiresAt = null

$metadata

Non-sensitive fields captured from the provider token response (e.g. Salesforce `instance_url`), as configured for the provider. Captured on OAuth code exchange and refresh, and on each `client_credentials` mint. A field a later OAuth refresh omits keeps its stored value. Present for `oauth` and `client_credentials` credentials; absent for `api_key`.

public array<string, mixed>|null $metadata = null

$missingScopes

If the integration has requested scopes that aren't present on the access token, they're listed here. Present for `oauth` and `client_credentials` credentials; absent for `api_key`.

public array<string|int, string>|null $missingScopes = null

$scopes

The scopes granted to the access token. Present for `oauth` and `client_credentials` credentials; absent for `api_key`.

public array<string|int, string>|null $scopes = null

$value

The vended secret. An OAuth access token when `auth_method` is `oauth`, the API key when `api_key`, or the client-credentials access token when `client_credentials`.

public string|null $value = null

Methods

__construct()

public __construct([string|null $object = null ][, string|null $authMethod = null ][, string|null $value = null ][, string|null $expiresAt = null ][, array<string|int, mixed>|null $scopes = null ][, array<string|int, mixed>|null $missingScopes = null ][, array<string|int, mixed>|null $metadata = null ][, array<string|int, mixed>|null $config = null ]) : mixed
Parameters
$object : string|null = null
$authMethod : string|null = null
$value : string|null = null
$expiresAt : string|null = null
$scopes : array<string|int, mixed>|null = null
$missingScopes : array<string|int, mixed>|null = null
$metadata : array<string|int, mixed>|null = null
$config : array<string|int, mixed>|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>
On this page

Search results