WorkOS PHP SDK

Widgets
in package

Table of Contents

Properties

$client  : HttpClient

Methods

__construct()  : mixed
createToken()  : WidgetSessionTokenResponse
Generate a widget token

Properties

Methods

createToken()

Generate a widget token

public createToken(string $organizationId[, string|null $userId = null ][, array<string|int, WidgetSessionTokenScopes>|null $scopes = null ][, RequestOptions|null $options = null ]) : WidgetSessionTokenResponse

Generate a widget token scoped to an organization and user with the specified scopes.

Parameters
$organizationId : string

The ID of the organization to scope the widget session to.

$userId : string|null = null

The ID of the user to issue the widget session token for.

$scopes : array<string|int, WidgetSessionTokenScopes>|null = null

The scopes to grant the widget session.

$options : RequestOptions|null = null
Tags
throws
WorkOSException
Return values
WidgetSessionTokenResponse

        
On this page

Search results