WorkOS.Widgets (WorkOS SDK for Elixir v3.0.1)

Copy Markdown View Source

Operations for the Widgets API.

Summary

Functions

create_token(client, params \\ %{}, opts \\ [])

@spec create_token(WorkOS.Client.t(), map(), keyword()) ::
  {:ok, WorkOS.WidgetSessionTokenResponse.t()} | {:error, WorkOS.Error.error()}

Generate a widget token

Generate a widget token for a user, optionally scoped to an organization. When an organization is specified, org-scoped widgets are enabled; omitting it issues a user-only token for widgets like UserProfile and UserSecurity.

Parameters