WorkOS PHP SDK

GenerateLink
in package
implements JsonSerializable uses JsonSerializableTrait

Read onlyYes

Table of Contents

Interfaces

JsonSerializable

Properties

$externalUserId  : string|null
The ID of the user in your application the link is generated for. The link and any Admin Portal sessions started from it can later be revoked by this ID, for example when that user is deprovisioned from your application.
$intent  : GenerateLinkIntent|null
The intent of the Admin Portal.
$itContactEmails  : array<string|int, string>|null
The email addresses of the IT contacts to grant access to the Admin Portal for the given organization. Accepts up to 20 emails.
$organization  : string
An [Organization](https://workos.com/docs/reference/organization) identifier.
$returnUrl  : string|null
The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.
$successUrl  : string|null
The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.

Methods

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

Properties

$externalUserId

The ID of the user in your application the link is generated for. The link and any Admin Portal sessions started from it can later be revoked by this ID, for example when that user is deprovisioned from your application.

public string|null $externalUserId = null

$intent

The intent of the Admin Portal.

public GenerateLinkIntent|null $intent = null
  • sso - Launch Admin Portal for creating SSO connections
  • dsync - Launch Admin Portal for creating Directory Sync connections
  • audit_logs - Launch Admin Portal for viewing Audit Logs
  • log_streams - Launch Admin Portal for creating Log Streams
  • domain_verification - Launch Admin Portal for Domain Verification
  • certificate_renewal - Launch Admin Portal for renewing SAML Certificates
  • bring_your_own_key - Launch Admin Portal for configuring Bring Your Own Key

$itContactEmails

The email addresses of the IT contacts to grant access to the Admin Portal for the given organization. Accepts up to 20 emails.

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

$organization

An [Organization](https://workos.com/docs/reference/organization) identifier.

public string $organization

$returnUrl

The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.

public string|null $returnUrl = null

$successUrl

The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.

public string|null $successUrl = null

Methods

__construct()

public __construct(string $organization[, string|null $returnUrl = null ][, string|null $successUrl = null ][, string|null $externalUserId = null ][, GenerateLinkIntent|null $intent = null ][, array<string|int, mixed>|null $itContactEmails = null ]) : mixed
Parameters
$organization : string
$returnUrl : string|null = null
$successUrl : string|null = null
$externalUserId : string|null = null
$intent : GenerateLinkIntent|null = null
$itContactEmails : 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>|stdClass
Return values
array<string|int, mixed>|stdClass

toArray()

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

Search results