Widgets
in package
Table of Contents
Properties
Methods
- __construct() : mixed
- createToken() : WidgetSessionTokenResponse
- Generate a widget token
Properties
$client read-only
private
HttpClient
$client
Methods
__construct()
public
__construct(HttpClient $client) : mixed
Parameters
- $client : HttpClient
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